Documentation ¶
Overview ¶
A simple amqp library for connecting to RabbitMQ
This is a wrapper around the github.com/streadway/amqp library.
Index ¶
- type RabbitMQ
- func (s *RabbitMQ) Connect() error
- func (r *RabbitMQ) Consume(channel *amqp.Channel, queue, consumer string, ...) (<-chan amqp.Delivery, error)
- func (s *RabbitMQ) NewChannel() (*amqp.Channel, error)
- func (s *RabbitMQ) Publish(routingKey string, msg []byte) error
- func (r *RabbitMQ) QueueBind(channel *amqp.Channel, name, key, exchange string, noWait bool, ...) error
- func (r *RabbitMQ) QueueDeclare(channel *amqp.Channel, name string, ...) (amqp.Queue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RabbitMQ ¶
type RabbitMQ struct { // The amqp url to connect to Url string `yaml:"url"` // The schange for publishing, defaults to amq.topic Exchange string `yaml:"exchange"` // The name of the connection that appears in the management plugin ConnectionName string `yaml:"connectionName"` // The heartBeat in seconds. Defaults to 10 HeartBeat int `yaml:"heartBeat"` // The product name in the management plugin (optional) Product string `yaml:"product"` // The product version in the management plugin (optional) Version string `yaml:"version"` // contains filtered or unexported fields }
func (*RabbitMQ) Consume ¶
func (r *RabbitMQ) Consume(channel *amqp.Channel, queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)
Consume adds a consumer to the queue and returns a GO channel
Click to show internal directories.
Click to hide internal directories.