Class AMQ::Client::Async::Channel
In: lib/amq/client/async/extensions/rabbitmq/basic.rb
lib/amq/client/async/extensions/rabbitmq/confirm.rb
lib/amq/client/async/channel.rb
Parent: Object

Methods

Included Modules

Extensions::RabbitMQ::Basic::ChannelMixin Extensions::RabbitMQ::Confirm::ChannelMixin Entity

Constants

DEFAULT_REPLY_TEXT = "Goodbye".freeze   API
RECOVERY_EVENTS = [:after_connection_interruption, :before_recovery, :after_recovery].freeze

Attributes

consumers_awaiting_cancel_ok  [R] 
consumers_awaiting_consume_ok  [R] 
exchanges_awaiting_declare_ok  [R] 
exchanges_awaiting_delete_ok  [R] 
flow_is_active  [RW] 
id  [R] 
queues_awaiting_bind_ok  [R] 
queues_awaiting_declare_ok  [R] 
queues_awaiting_delete_ok  [R] 
queues_awaiting_get_response  [R] 
queues_awaiting_purge_ok  [R] 
queues_awaiting_unbind_ok  [R] 

Public Class methods

Public Instance methods

Acknowledge one or all messages on the channel.

@api public @see bit.ly/amqp091reference AMQP 0.9.1 protocol reference (Section 1.8.3.13.)

after_connection_interruption(&block)
after_recovery(&block)

Alias for on_recovery

Called by associated connection object when AMQP connection has been re-established (for example, after a network failure).

@api plugin

@return [Boolean] true if this channel uses automatic recovery mode

Defines a callback that will be executed after TCP connection has recovered after a network failure but before AMQP connection is re-opened. Only one callback can be defined (the one defined last replaces previously added ones).

@api public

AMQP connection this channel belongs to.

@return [AMQ::Client::Connection] Connection this channel belongs to.

@return [Hash<String, Consumer>]

@return [Array<Exchange>] Collection of exchanges that were declared on this channel.

Finds exchange in the exchanges cache on this channel by name. Exchange only exists in the cache if it was previously instantiated on this channel.

@param [String] name Exchange name @return [AMQ::Client::Exchange] Exchange (if found) @api plugin

@api plugin @private

Asks the peer to pause or restart the flow of content data sent to a consumer. This is a simple flow­control mechanism that a peer can use to avoid overflowing its queues or otherwise finding itself receiving more messages than it can process. Note that this method is not intended for window control. It does not affect contents returned to Queue#get callers.

@param [Boolean] active Desired flow state.

@see bit.ly/amqp091reference AMQP 0.9.1 protocol reference (Section 1.5.2.3.) @api public

@return [Boolean] True if flow in this channel is active (messages will be delivered to consumers that use this channel).

@api public

@api plugin @private

@api plugin @private

@api plugin @private

Defines a callback that will be executed after TCP connection is interrupted (typically because of a network failure). Only one callback can be defined (the one defined last replaces previously added ones).

@api public

Defines a callback that will be executed when channel is closed after channel-level exception.

@api public

Defines a callback that will be executed after AMQP connection has recovered after a network failure. Only one callback can be defined (the one defined last replaces previously added ones).

@api public

Opens AMQP channel.

@api public

Requests a specific quality of service. The QoS can be specified for the current channel or for all channels on the connection.

@note RabbitMQ as of 2.3.1 does not support prefetch_size. @api public

@return [Array<Queue>] Collection of queues that were declared on this channel.

Notifies AMQ broker that consumer has recovered and unacknowledged messages need to be redelivered.

@return [Channel] self

@note RabbitMQ as of 2.3.1 does not support basic.recover with requeue = false. @see bit.ly/amqp091reference AMQP 0.9.1 protocol reference (Section 1.8.3.16.) @api public

@api plugin @private

Reject a message with given delivery tag.

@api public @see bit.ly/amqp091reference AMQP 0.9.1 protocol reference (Section 1.8.3.14.)

reopen(&block)

Alias for open

@api plugin @private

Synchronizes given block using this channel‘s mutex. @api public

Commits AMQP transaction.

@api public

Rolls AMQP transaction back.

@api public

Sets the channel to use standard transactions. One must use this method at least once on a channel before using tx_tommit or tx_rollback methods.

@api public

[Validate]