Documentation ¶
Index ¶
- func GetNewChannel(conn *amqp.Connection) (ch *amqp.Channel, err error)
- func GetNewConnection(url string) (conn *amqp.Connection, err error)
- func ListenViaAmqp(c2 chan os.Signal)
- func ListenViaStomp(c2 chan os.Signal)
- func SendQueue(conn *amqp.Connection, ch *amqp.Channel) error
- func SendTopic(ch *amqp.Channel) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNewChannel ¶
func GetNewChannel(conn *amqp.Connection) (ch *amqp.Channel, err error)
GetNewChannel returns a new *amqp.Channel from the passed *amqp.Connection instance and error if any
func GetNewConnection ¶
func GetNewConnection(url string) (conn *amqp.Connection, err error)
GetNewConnection returns a new *amqp.Connection and error if any
func ListenViaAmqp ¶
ListenViaAmqp directly connects to a RabbitMQ instance, sets up a sample topic exchange and creates a queue that is bound with routing key "something.somewhere". this method is not using any of Transport function but is useful to observe messages that originated from Transport. for more details about RabbitMQ Golang examples refer to https://www.rabbitmq.com/getstarted.html
func ListenViaStomp ¶
ListenViaStomp directly connects to a RabbitMQ instance via TCP port 61613 that RabbitMQ STOMP plugin exposes, and listens on topic "something.somewhere". also it sends out a test message to the topic after a one second delay. note that RabbitMQ STOMP plugin routes messages arriving from the client to the amq.topic exchange. for details see producer.go
func SendQueue ¶
func SendQueue(conn *amqp.Connection, ch *amqp.Channel) error
SendQueue sends a message to a direct exchange with routing key "testing".
func SendTopic ¶
SendTopic sends a message to a topic exchange with routing key "something.somewhere". if environment variable LISTEN_METHOD is set to rbmq_stomp then the excahgne is set to amq.topic instead of logs_topic because RabbitMQ STOMP plugin routes incoming messages to the amq.topic exchange.
Types ¶
This section is empty.