Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerArgs ¶
type ConsumerOption ¶
type ConsumerOption func(*ReliableRabbitConsumer)
func WithConsumerArgs ¶
func WithConsumerArgs(args ConsumerArgs) ConsumerOption
func WithDeclaredQueueArgs ¶
func WithDeclaredQueueArgs(args DeclaredQueueArgs) ConsumerOption
func WithExchangeArgs ¶
func WithExchangeArgs(args ExchangeArgs) ConsumerOption
func WithLogger ¶
func WithLogger(l logger.Logger) ConsumerOption
func WithQos ¶
func WithQos(prefetchCount int, global bool) ConsumerOption
type DeclaredQueueArgs ¶
type ExchangeArgs ¶
type ReliableRabbitConsumer ¶
type ReliableRabbitConsumer struct { URL string ExchangeArgs ExchangeArgs DeclaredQueueArgs DeclaredQueueArgs ConsumerArgs ConsumerArgs HandleFunc func(ctx context.Context, msg amqp091.Delivery) interface{} // contains filtered or unexported fields }
func NewReliableRabbitConsumer ¶
func NewReliableRabbitConsumer(url string, handleFunc func(ctx context.Context, msg amqp091.Delivery) interface{}, opts ...ConsumerOption) *ReliableRabbitConsumer
func (*ReliableRabbitConsumer) Start ¶
func (c *ReliableRabbitConsumer) Start() (err error)
func (*ReliableRabbitConsumer) Stop ¶
func (c *ReliableRabbitConsumer) Stop()
Click to show internal directories.
Click to hide internal directories.