Documentation ¶
Overview ¶
Package rabbitmq provides support for RabbitMQ message broker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageBroker ¶
type MessageBroker struct {
Connection *amqp.Connection // amqp connection
}
MessageBroker represents message broker based on RabbitMQ.
func NewMessageBroker ¶
func NewMessageBroker(address string, opts ...cb.Option) *MessageBroker
NewMessageBroker creates instance of RabbitMQ message broker which is connected on provided address. Additional options passed as arguments are used to configure circuit breaker pattern to connect to RabbitMQ instance. Panics if cannot create an instance.
func (*MessageBroker) Dispose ¶
func (b *MessageBroker) Dispose()
Dispose closes RabbitMQ connection.
func (MessageBroker) PublishMessage ¶
PublishMessage publishes message to RabbitMQ instance.
Click to show internal directories.
Click to hide internal directories.