The connection this channel belongs to
ID of the channel
Readonly
connectionReadonly
consumersOptional
deliveryOptional
getReadonly
idOptional
returnedAcknowledge a delivered message
tag of the message
Optional
multiple: boolean = falsebatch confirm all messages up to this delivery tag
Consume from a queue. Messages will be delivered asynchronously.
name of the queue to poll
Optional
args?: {}custom arguments
Optional
exclusive?: booleanif this can be the only consumer of the queue, will return an Error if there are other consumers to the queue already
Optional
noAck?: booleanif messages are removed from the server upon delivery, or have to be acknowledged
Optional
tag?: stringtag of the consumer, will be server generated if left empty
will be called for each message delivered to this consumer
Enable or disable flow. Disabling flow will stop the server from delivering messages to consumers. Not supported in RabbitMQ
false to stop the flow, true to accept messages
Synchronously receive a message from a queue
name of the queue to poll
Optional
noAck?: booleanif message is removed from the server upon delivery, or have to be acknowledged
Acknowledge a delivered message
tag of the message
Optional
requeue: boolean = falseif the message should be requeued or removed
Optional
multiple: boolean = falsebatch confirm all messages up to this delivery tag
Publish a message
the exchange to publish to, the exchange must exists
routing key
the data to be published, can be a string or an uint8array
properties to be published
Optional
mandatory: boolean = falseif the message should be returned if there's no queue to be delivered to
Optional
immediate: boolean = falseif the message should be returned if it can't be delivered to a consumer immediately (not supported in RabbitMQ)
Set prefetch limit. Recommended to set as each unacknowledged message will be stored in memory of the client. The server won't deliver more messages than the limit until messages are acknowledged.
number of messages to limit to
number of bytes to limit to (not supported by RabbitMQ)
if the prefetch is limited to the channel, or if false to each consumer
Tell the server to redeliver all unacknowledged messages again, or reject and requeue them.
Optional
requeue: boolean = falseif the message should be requeued or redeliviered to this channel
Acknowledge a delivered message
tag of the message
Optional
requeue: boolean = falseif the message should be requeued or removed
Close the channel gracefully
Optional
reason: string = ""might be logged by the server
Enable publish confirm. The server will then confirm each publish with an Ack or Nack when the message is enqueued.
Exchange to exchange binding.
name of the destination exchange
name of the source exchange
key to bind with
optional arguments, e.g. for header exchanges
fulfilled when confirmed by the server
Declare an exchange
name of the exchange
type of exchange (direct, fanout, topic, header, or a custom type)
Optional
autoDelete?: booleanif the exchange should be deleted when the last binding from it is deleted
Optional
durable?: booleanif the exchange should survive server restarts
Optional
internal?: booleanif exchange is internal to the server. Client's can't publish to internal exchanges.
Optional
passive?: booleanif the exchange name doesn't exist the channel will be closed with an error, fulfilled if the exchange name does exists
optional arguments
Fulfilled when the exchange is created or if it already exists
Delete an exchange
name of the exchange
Optional
ifUnused?: booleanonly delete if the exchange doesn't have any bindings
Fulfilled when the exchange is deleted or if it's already deleted
Delete an exchange-to-exchange binding
name of destination exchange
name of the source exchange
key that was bound
arguments, e.g. for header exchanges
fulfilled when confirmed by the server
Default handler for Returned messages
returned from server
Alias for basicQos
max inflight messages
Declare a queue and return an AMQPQueue instance.
Bind a queue to an exchange
name of the queue
name of the exchange
key to bind with
optional arguments, e.g. for header exchanges
fulfilled when confirmed by the server
Declare a queue
name of the queue, if empty the server will generate a name
Optional
autoDelete?: booleanif the queue should be deleted when the last consumer of the queue disconnects
Optional
durable?: booleanif the queue should survive server restarts
Optional
exclusive?: booleanif the queue should be deleted when the channel is closed
Optional
passive?: booleanif the queue name doesn't exist the channel will be closed with an error, fulfilled if the queue name does exists
optional custom queue arguments
fulfilled when confirmed by the server
Delete a queue
name of the queue, if empty it will delete the last declared queue
Optional
ifEmpty?: booleanonly delete if the queue is empty
Optional
ifUnused?: booleanonly delete if the queue doesn't have any consumers
Purge a queue
name of the queue
fulfilled when confirmed by the server
Unbind a queue from an exchange
name of the queue
name of the exchange
key that was bound
arguments, e.g. for header exchanges
fulfilled when confirmed by the server
Commit a transaction
Rollback a transaction
Set this channel in Transaction mode. Rember to commit the transaction, overwise the server will eventually run out of memory.
Represents an AMQP Channel. Almost all actions in AMQP are performed on a Channel.