Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
A consumer that applications use to register functions to act as consumers.
Consumers will connect to the AMQP server when the Consume method is called. You can manualy connect using the Connect method as well.
func Create ¶
Create a new consumer using the connection, exchange binding and queue configurations in the provide configuration file. Once created you can bind consumers to start handling messages
func (*Consumer) Connect ¶
Connect to the AMQP server.
Will do the following work:
- Create the connection. - Declare the exchange. - Declare the queue. - Bind the queue + exchange together.
func (*Consumer) Consume ¶
Takes a function that accepts amqp.Delivery and binds it to the configured queue.
The provided function will be called each time a message is received and the function is expected to Ack or Nack the message.