consumer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoQueueSpecified = errors.New("no queue specification specified")
)

Functions

func WithNotifierHook

func WithNotifierHook(fn wabbitiface.Notify) func(*Consumer)

Types

type Consumer

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

Consumer for queue

func New

func New(conn *wabbit.Connection, options ...func(*opts.Options)) (*Consumer, error)

func (*Consumer) Consume

func (c *Consumer) Consume() (map[*opts.QueueInfo]<-chan amqp.Delivery, error)

func (*Consumer) Start

func (c *Consumer) Start(handler Handler) error

type Handler

type Handler interface {
	ProcessMessage(queueInfo *opts.QueueInfo, delivery wabbitiface.WrappedDelivery)
}

Jump to

Keyboard shortcuts

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