rabbitmq

package
v0.0.0-...-bfdf4f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

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

func ListenViaAmqp(c2 chan os.Signal)

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

func ListenViaStomp(c2 chan os.Signal)

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

func SendTopic(ch *amqp.Channel) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL