queue_manager.rb

Path: lib/stomp_server/queue_manager.rb
Last Update: Sat Jul 28 03:29:06 +0200 2007
Queue DBMQueue FileQueue EventMachine::Connection Stomp Http StompFrameRecognizer Run TopicManager StompAuth Configurator ActiveRecordQueue StompId MemoryQueue StompUser StompFrame QueueMonitor QueueManager TestServer Protocols StompServer dot/f_4.png

QueueManager is used in conjunction with a storage class. The storage class MUST implement the following two methods:

  • enqueue(queue name, frame)

enqueue pushes a frame to the top of the queue in FIFO order. It‘s return value is ignored. enqueue must also set the message-id and add it to the frame header before inserting the frame into the queue.

  • dequeue(queue name)

dequeue removes a frame from the bottom of the queue and returns it.

  • requeue(queue name,frame)

does the same as enqueue, except it puts the from at the bottom of the queue

The storage class MAY implement the stop() method which can be used to do any housekeeping that needs to be done before stompserver shuts down. stop() will be called when stompserver is shut down.

The storage class MAY implement the monitor() method. monitor() should return a hash of hashes containing the queue statistics. See the file queue for an example. Statistics are available to clients in /queue/monitor.

[Validate]