rabbitmq

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumerFactory added in v0.4.3

func NewConsumerFactory(cfg *config.ProviderConfig) (queue.MessageQueueConsumer, error)

NewConsumerFactory returns a new RabbitMQ consumer based on the provided configuration.

Types

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

Consumer is the implementation of the MessageQueueConsumer interface for RabbitMQ

func NewConsumer

func NewConsumer(cfg *config.AMQPConfig) *Consumer

NewConsumer creates a new RabbitMQ consumer

func (*Consumer) Close

func (c *Consumer) Close() error

Close closes the connection to RabbitMQ

func (*Consumer) Connect

func (c *Consumer) Connect() error

Connect creates a connection to RabbitMQ and a channel

func (*Consumer) Consume

func (c *Consumer) Consume(queueName string, handler func(msg []byte) error) error

Consume consumes messages from RabbitMQ

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL