Package coilmq :: Module scheduler :: Class QueuePriorityScheduler
[frames] | no frames]

Class QueuePriorityScheduler

object --+
         |
        QueuePriorityScheduler

Abstract base class for objects that provide a way to prioritize the queues.

Instance Methods
str
choice(self, queues, connection)
Choose which queue to select for messages to specified connection.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

choice(self, queues, connection)

 

Choose which queue to select for messages to specified connection.

Parameters:
  • queues (dict of str to set of stompclient.frame.Frame) - A dict mapping queue name to queues (sets of frames) to which specified connection is subscribed.
  • connection (coilmq.server.StompConnection) - The connection that is going to be delivered the frame(s).
Returns: str
A selected queue destination (name) or None if queues dict is empty.