Optional
propsOrUrl: string | ConnectionOptionsCreate a message consumer that can recover from dropped connections.
Process an incoming message.
Create a message publisher that can recover from dropped connections. This will create a dedicated Channel, declare queues, declare exchanges, and declare bindings. If the connection is reset, then all of this setup will rerun on a new Channel. This also supports retries.
This will create a single "client" Channel
on which you may publish
messages and listen for direct responses. This can allow, for example, two
micro-services to communicate with each other using RabbitMQ as the
middleman instead of directly via HTTP.
Optional
props: RPCPropsThe connection is successfully (re)established
The rabbitmq server is low on resources. Message publishers should pause. The outbound side of the TCP socket is blocked until "connection.unblocked" is received, meaning messages will be held in memory. https://www.rabbitmq.com/connection-blocked.html
The rabbitmq server is accepting new messages.
Generated using TypeDoc
This represents a single connection to a RabbitMQ server (or cluster). Once created, it will immediately attempt to establish a connection. When the connection is lost, for whatever reason, it will reconnect. This implements the EventEmitter interface and may emit
error
events. Close it with Connection#close()Example