Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { GetConn() *amqp.Connection GetChannel() *amqp.Channel SetReconnectHooks(...func()) }
func NewConnection ¶
func NewConnection(options *Options) Connection
type Options ¶
type Options struct { /* URI is the RabbitMQ connection string with format: "amqp://username:password@localhost:5672" */ URI string /* InitialBackoffInterval is the initial delay between reconnections. Each time the client reconnects, it waits for last(or initial) backoff interval * 2 until and this value increases (x2) on each retry until reach the max configured interval. Once the client successful reconnects the backoff interval is set back to the initial value. */ InitialBackoffInterval time.Duration /* MaxBackoffInterval is the max interval between reconnections. Each time the client reconnects, it waits for last(or initial) backoff interval * 2 until and this value increases (x2) on each retry until reach the max configured interval. Once the client successful reconnects the backoff interval is set back to the initial value. */ MaxBackoffInterval time.Duration }
Options contains the RabbitMQ connection and reconnection params
Click to show internal directories.
Click to hide internal directories.