Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { // Broker is a utility wrapper around a RabbitMQ connection. Broker broker.Broker // contains filtered or unexported fields }
Component is a RabbitMQ consumer / producer to do the heavy lifting for routing
func NewConsumer ¶
NewConsumer creates a Consumer Component instance ready to connect to the rabbitmq + queue and execute the operator function for every recieved message.
func NewProducer ¶
NewProducer creates a Component instance ready to Connect to the rabbitmq, but it does not launch any workers and doesn't automatically consume incoming messages. The queue can be empty if the Producer is not interested in the result or progress updates, otherwise it is recommended to set the queue to: 'amq.rabbitmq.reply-to' (AMQPReplyTo) for a Direct Reply-To.
func (*Component) Close ¶
func (c *Component) Close()
Close terminates the RabbitMQ channel and connection. Should be used when running a Producer, after Connect is called. Automatically called after Shutdown for a running Consumer.
func (*Component) Connect ¶
Connect opens up a RabbitMQ connection and returns a channel through which Messages are delivered.
func (*Component) IsShuttingDown ¶
IsShuttingDown returns a channel to be closed when the Consumer is shutting down.
func (*Component) SendMessage ¶
SendMessage sends a message onto the message's current Slip queue