Class: Qpid::Management::Queue

Inherits:
BrokerObject show all
Defined in:
lib/qpid_management/queue.rb

Overview

Representation of a queue. Properties include:

  • acquires

  • arguments

  • autoDelete

  • bindingCount

  • bindingCountHigh

  • bindingCountLow

  • byteDepth

  • byteFtdDepth

  • byteFtdDequeues

  • byteFtdEnqueues

  • bytePersistDequeues

  • bytePersistEnqueues

  • byteTotalDequeues

  • byteTotalEnqueues

  • byteTxnDequeues

  • byteTxnEnqueues

  • consumerCount

  • consumerCountHigh

  • consumerCountLow

  • discardsLvq

  • discardsOverflow

  • discardsPurge

  • discardsRing

  • discardsSubscriber

  • discardsTtl

  • durable

  • exclusive

  • flowStopped

  • flowStoppedCount

  • messageLatencyAvg

  • messageLatencyCount

  • messageLatencyMax

  • messageLatencyMin

  • msgDepth

  • msgFtdDepth

  • msgFtdDequeues

  • msgFtdEnqueues

  • msgPersistDequeues

  • msgPersistEnqueues

  • msgTotalDequeues

  • msgTotalEnqueues

  • msgTxnDequeues

  • msgTxnEnqueues

  • name

  • releases

  • reroutes

  • unackedMessages

  • unackedMessagesHigh

  • unackedMessagesLow

  • vhostRef

Instance Attribute Summary

Attributes inherited from BrokerObject

#content

Instance Method Summary collapse

Methods inherited from BrokerObject

#[], #created_at, #deleted_at, #id, #initialize, #invoke_method, #method_missing, qmf_class, #refresh!, #short_id, #to_s, #updated_at

Constructor Details

This class inherits a constructor from Qpid::Management::BrokerObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Qpid::Management::BrokerObject

Instance Method Details

#purge(message_count, filter = {}) ⇒ Object

Purges (removes) messages from this queue

Parameters:

  • message_count (Fixnum)

    number of messages to remove from the queue, or 0 for all messages

  • filter (Hash) (defaults to: {})

    an optional filter to use when removing messages



77
78
79
# File 'lib/qpid_management/queue.rb', line 77

def purge(message_count, filter={})
  invoke_method('purge', {'request' => message_count, 'filter' => filter}, "org.apache.qpid.broker:queue:#{name}")
end

#reroute(message_count, use_alternate_exchange, exchange, filter) ⇒ Object

Reroutes messages from this queue to an exchange, either the queue’s alternate exchange, or the specified exchange

Parameters:

  • message_count (Fixnum)

    number of messages to reroute from the queue, or 0 for all messages

  • use_alternate_exchange (Boolean)

    whether to use the queue’s alternate exchange as the destination

  • exchange (String)

    name of destination exchange

  • filter (Hash)

    an optional filter to use when rerouting messages



87
88
89
90
91
92
93
94
# File 'lib/qpid_management/queue.rb', line 87

def reroute(message_count, use_alternate_exchange, exchange, filter)
  args = {'request' => message_count,
          'useAltExchange' => use_alternate_exchange,
          'exchange' => exchange,
          'filter' => filter}

  invoke_method('reroute', args, "org.apache.qpid.broker:queue:#{name}")
end