Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Context is used to identify the AMQP server in logging Context = "AMQP" // ExchangeName to use for AMQP queues ExchangeName = `fluidity` // ExchangeType to use for routing messages inside the queue ExchangeType = `topic` // EnvQueueAddr is the address to access RabbitMQ. EnvQueueAddr = `FLU_AMQP_QUEUE_ADDR` // EnvDeadLetterEnabled to disable the use of dead letter queues // (disabling with "false" implies disabling retries) EnvDeadLetterEnabled = `FLU_AMQP_QUEUE_DEAD_LETTER_ENABLED` // EnvMessageRetries to attempt until giving up - defaults to // 5 if not set! EnvMessageRetries = `FLU_AMQP_QUEUE_MESSAGE_RETRIES` // EnvGoroutinesPerQueue for the number of goroutines to run // per topic, defaults to 1 EnvGoroutinesPerQueue = `FLU_AMQP_GOROUTINES_PER_QUEUE` // EnvMessageLoggingEnabled to log all incoming messages using a log // debug if set to anything other than "" EnvMessageLoggingEnabled = `FLU_DEBUG_MESSAGE_LOGGING_ENABLED` )
View Source
const RandomConsumerPrefixLength = 8
RandomConsumerPrefixLength to append to the worker id
Variables ¶
This section is empty.
Functions ¶
func GetMessages ¶
GetMessages from the AMQP server, calling the function each time a message is received. If newTopic is set to true, a new queue name will be generated that will make this useful for receiving messages that would be received over broadcast that is unique to this worker. If it is set to false, every message that would be received is distributed across any worker sharing the same worker id.
func SendMessage ¶
func SendMessage(topic string, content interface{})
SendMessage down a topic, with the JSON form of the content.
func SendMessageBytes ¶
SendMessageBytes down a topic, with bytes as content
Types ¶
Click to show internal directories.
Click to hide internal directories.