rabbitmq

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Conn    *amqp.Connection
	Channel *amqp.Channel
	Queue   amqp.Queue
	Err     chan error
}

Connection is the RabbitMQ connection

func (*Connection) Connect

func (c *Connection) Connect() error

Connect initialize the RabbitMQ connection

func (*Connection) Consume

func (c *Connection) Consume() (map[string]<-chan amqp.Delivery, error)

Consume consumes the messages from the queues and passes it as map of chan of amqp.Delivery

func (*Connection) HandleConsumedMessages added in v1.0.2

func (c *Connection) HandleConsumedMessages(q string, message <-chan amqp.Delivery, fn func(Connection, string, <-chan amqp.Delivery), second int)

HandleConsumedMessages handles the consumed messages from the queues

func (*Connection) Reconnect

func (c *Connection) Reconnect(second int)

Reconnect reconnects the RabbitMQ connection

Jump to

Keyboard shortcuts

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