amqp v1.2.1 AMQP.Confirm View Source
Functions that work with publisher confirms (RabbitMQ extension to AMQP 0.9.1).
Link to this section Summary
Functions
On channel with confirm activated, return the next message sequence number.
To use in combination with register_handler/2
Register a handler for confirms on channel. The handler will receive either
Activates publishing confirmations on the channel.
Remove the return handler.
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
Wait until all messages published since the last call have been either ack'd or nack'd by the broker, or until timeout elapses.
Wait until all messages published since the last call have been either ack'd or nack'd by the broker, or until timeout elapses. If any of the messages were nack'd, the calling process dies.
Link to this section Functions
next_publish_seqno(channel)
View Source
next_publish_seqno(AMQP.Channel.t()) :: non_neg_integer()
next_publish_seqno(AMQP.Channel.t()) :: non_neg_integer()
On channel with confirm activated, return the next message sequence number.
To use in combination with register_handler/2
register_handler(channel, handler_pid)
View Source
register_handler(AMQP.Channel.t(), pid()) :: :ok
register_handler(AMQP.Channel.t(), pid()) :: :ok
Register a handler for confirms on channel. The handler will receive either:
{:basic_ack, seqno, multiple}
{:basic_nack, seqno, multiple}
The seqno
(delivery_tag) is an integer, the sequence number of the message.
multiple
is a boolean, when true
means multiple messages confirm, upto seqno
.
see https://www.rabbitmq.com/confirms.html
select(channel)
View Source
select(AMQP.Channel.t()) :: :ok | AMQP.Basic.error()
select(AMQP.Channel.t()) :: :ok | AMQP.Basic.error()
Activates publishing confirmations on the channel.
unregister_handler(channel)
View Source
unregister_handler(AMQP.Channel.t()) :: :ok
unregister_handler(AMQP.Channel.t()) :: :ok
Remove the return handler.
It does nothing if there is no such handler.
wait_for_confirms(channel)
View Source
wait_for_confirms(AMQP.Channel.t()) :: boolean() | :timeout
wait_for_confirms(AMQP.Channel.t()) :: boolean() | :timeout
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
wait_for_confirms(channel, timeout)
View Source
wait_for_confirms(AMQP.Channel.t(), non_neg_integer()) :: boolean() | :timeout
wait_for_confirms(AMQP.Channel.t(), non_neg_integer()) :: boolean() | :timeout
Wait until all messages published since the last call have been either ack'd or nack'd by the broker, or until timeout elapses.
wait_for_confirms_or_die(channel)
View Source
wait_for_confirms_or_die(AMQP.Channel.t()) :: true
wait_for_confirms_or_die(AMQP.Channel.t()) :: true
Wait until all messages published since the last call have been either ack'd or nack'd by the broker, or until timeout elapses. If any of the messages were nack'd, the calling process dies.
wait_for_confirms_or_die(channel, timeout)
View Source
wait_for_confirms_or_die(AMQP.Channel.t(), non_neg_integer()) :: true
wait_for_confirms_or_die(AMQP.Channel.t(), non_neg_integer()) :: true