# README
RMQ Publisher
This library is a wrapper around RMQ functions to make interaction with RMQ simpler and safer. Functionality is tested with hosted CloudAMQP, which offers automated failover using connection with a single URI.
Adapted from go-rabbitmq
Quickstart
Refer to example/publisher.example.go
to see how to setup your own publisher
# Packages
No description provided by the author
# Functions
NewConn creates a new connection manager.
NewPublisher returns a new publisher with an open channel to the cluster.
WithConnectionOptionsConfig sets the Config used in the connection.
WithConnectionOptionsLogger sets logging to true on the consumer options and sets the.
WithConnectionOptionsLogging sets logging to true on the consumer options and sets the.
WithConnectionOptionsReconnectInterval sets the reconnection interval.
WithPublisherOptionsExchangeArgs adds optional args to the exchange.
WithPublisherOptionsExchangeAutoDelete ensures the exchange is an auto-delete exchange.
WithPublisherOptionsExchangeDeclare stops this library from declaring the exchanges existance.
WithPublisherOptionsExchangeDurable ensures the exchange is a durable exchange.
WithPublisherOptionsExchangeInternal ensures the exchange is an internal exchange.
WithPublisherOptionsExchangeKind ensures the queue is a durable queue.
WithPublisherOptionsExchangeName sets the exchange name.
WithPublisherOptionsExchangeNoWait ensures the exchange is a no-wait exchange.
WithPublisherOptionsExchangePassive ensures the exchange is a passive exchange.
WithPublisherOptionsLogger sets logging to a custom interface.
WithPublisherOptionsLogging sets logging to true on the publisher options.
WithPublishOptionsAppID returns a function that sets the application id.
WithPublishOptionsAutoMessageID returns a function that sets the message identifier to an auto generated value.
WithPublishOptionsContentEncoding returns a function that sets the content encoding, i.e.
WithPublishOptionsContentType returns a function that sets the content type, i.e.
WithPublishOptionsCorrelationID returns a function that sets the content correlation identifier.
WithPublishOptionsExchange returns a function that sets the exchange to publish to.
WithPublishOptionsExpiration returns a function that sets the expiry/TTL of a message.
WithPublishOptionsHeaders returns a function that sets message header values, i.e.
WithPublishOptionsImmediate makes the publishing immediate, which means when a consumer is not available to immediately handle the new message, a message will be sent back on the returns channel for you to handle.
WithPublishOptionsMandatory makes the publishing mandatory, which means when a queue is not bound to the routing key a message will be sent back on the returns channel for you to handle.
WithPublishOptionsMessageID returns a function that sets the message identifier.
WithPublishOptionsPersistentDelivery sets the message to persist.
WithPublishOptionsPriority returns a function that sets the content priority from 0 to 9.
WithPublishOptionsReplyTo returns a function that sets the reply to field.
WithPublishOptionsTimestamp returns a function that sets the timestamp for the message.
WithPublishOptionsType returns a function that sets the message type name.
WithPublishOptionsUserID returns a function that sets the user id i.e.
# Structs
Confirmation notifies the acknowledgment or negative acknowledgement of a publishing identified by its delivery tag.
Conn manages the connection to a rabbit cluster it is intended to be shared across publishers and consumers.
ConnectionOptions are used to describe how a new consumer will be created.
ExchangeOptions are used to configure an exchange.
Publisher allows you to publish messages safely across an open connection.
PublisherOptions are used to describe a publisher's configuration.
PublishOptions are used to control how data is published.
Return captures a flattened struct of fields returned by the server when a Publishing is unable to be delivered either due to the `mandatory` flag set and no route found, or `immediate` flag set and no free consumer.
# Type aliases
Config wraps amqp.Config Config is used in DialConfig and Open to specify the desired tuning parameters used during a connection open handshake.
PublisherConfirmation is a slice of Confirmations that can be used to wait for all of them to be confirmed.
Table stores user supplied fields of the following types:
bool byte float32 float64 int int16 int32 int64 nil string time.Time amqp.Decimal amqp.Table []byte []interface{} - containing above types
Functions taking a table will immediately fail when the table contains a value of an unsupported type.