Class AMQ::Client::Async::Queue
In: lib/amq/client/async/queue.rb
Parent: Object

Methods

Included Modules

Entity ServerNamedEntity

Attributes

arguments  [R]  @return [Hash] Additional arguments given on queue declaration. Typically used by AMQP extensions.
bindings  [R]  @return [Array<Hash>]
channel  [R]  Channel this queue belongs to. @return [AMQ::Client::Channel]
consumers  [R]  @return [Array<Hash>] All consumers on this queue.
default_consumer  [R]  @return [AMQ::Client::Consumer] Default consumer (registered with {Queue#consume}).
name  [R]  Qeueue name. May be server-generated or assigned directly. @return [String]

Public Class methods

@return [Class] AMQ::Client::Consumer or other class implementing consumer API. Used by libraries like {github.com/ruby-amqp/amqp Ruby amqp gem}. @api plugin

@param [AMQ::Client::Adapter] AMQ networking adapter to use. @param [AMQ::Client::Channel] AMQ channel this queue object uses. @param [String] Queue name. Please note that AMQP spec does not require brokers to support Unicode for queue names. @api public

Public Instance methods

Acknowledge a delivery tag. @return [Queue] self

@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

@return [Boolean] true if this queue was declared as automatically deleted (deleted as soon as last consumer unbinds). @api public

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

@api plugin

Defines a callback that will be executed after TCP connection is 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

Unsubscribes from message delivery. @return [Queue] self

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

Declares this queue.

@return [Queue] self

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

Deletes this queue.

@param [Boolean] if_unused delete only if queue has no consumers (subscribers). @param [Boolean] if_empty delete only if queue has no messages in it. @param [Boolean] nowait Don‘t wait for reply from broker. @return [Queue] self

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

@return [Boolean] true if this queue was declared as durable (will survive broker restart). @api public

@return [Boolean] true if this queue was declared as exclusive (limited to just one consumer) @api public

Unique string supposed to be used as a consumer tag.

@return [String] Unique string. @api plugin

Fetches messages from the queue. @return [Queue] self

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

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

@api public @see bit.ly/amqp091reference AMQP 0.9.1 protocol reference (Sections 1.8.3.9)

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

@api public

Purges (removes all messagse from) the queue. @return [Queue] self

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

Used by automatic recovery machinery. @private @api plugin

Re-declares queue with the same attributes @api public

@return [Queue] self

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

@return [Queue] self

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

[Validate]