Documentation ¶
Index ¶
- Variables
- func ConnectAndDeliverOverDurableExchange(config RabbitConnectionConfig, payload []byte) error
- func ConnectAndDeliverOverDurableQueue(config RabbitConnectionConfig, payload []byte) error
- func ConnectAndDeliverOverExchange(config RabbitConnectionConfig, payload []byte) error
- func ConnectAndDeliverOverQueue(config RabbitConnectionConfig, payload []byte) error
- func ListenOnQueue(config RabbitConnectionConfig, handler func(payload []byte)) error
- func ListenOnQueueWithExchange(config RabbitConnectionConfig, handler func(payload []byte)) error
- type RabbitConnectionConfig
- type RabbitMQConnection
Constants ¶
This section is empty.
Variables ¶
var ( InvalidRabbitMQConfig = errors.New("invalid RabbitMQ configuration") RabbitMQConnectionError = errors.New("cannot connect to RabbitMQ server") )
Functions ¶
func ConnectAndDeliverOverDurableExchange ¶
func ConnectAndDeliverOverDurableExchange(config RabbitConnectionConfig, payload []byte) error
function used to generate new exchange to deliver message over exchange
func ConnectAndDeliverOverDurableQueue ¶
func ConnectAndDeliverOverDurableQueue(config RabbitConnectionConfig, payload []byte) error
function used to generate new queue to deliver message over a durable queue
func ConnectAndDeliverOverExchange ¶
func ConnectAndDeliverOverExchange(config RabbitConnectionConfig, payload []byte) error
function used to generate new exchange to deliver message over exchange
func ConnectAndDeliverOverQueue ¶
func ConnectAndDeliverOverQueue(config RabbitConnectionConfig, payload []byte) error
function used to generate new queue to deliver message
func ListenOnQueue ¶
func ListenOnQueue(config RabbitConnectionConfig, handler func(payload []byte)) error
function used to start blocking goroutine that connects to rabbitMQ connection and executes some handler function when messages are send over the specified queue
func ListenOnQueueWithExchange ¶
func ListenOnQueueWithExchange(config RabbitConnectionConfig, handler func(payload []byte)) error
function used to start blocking goroutine that connects to rabbitMQ connection and executes some handler function when messages are send over the specified queue or exchange
Types ¶
type RabbitConnectionConfig ¶
type RabbitMQConnection ¶
type RabbitMQConnection struct { Connection *amqp.Connection Channel *amqp.Channel }
func NewRabbitConnection ¶
func NewRabbitConnection(config RabbitConnectionConfig) (*RabbitMQConnection, error)
function used to create new rabbitMQ channel using AMQP library. channels can the be used to create new queues and exchanges