Utilities
Utilities for the MessageQueue package
- DIRAC.Resources.MessageQueue.Utilities.generateDefaultCallback()
- Function generates a default callback that can
be used to handle the messages in the MQConsumer clients. It contains the internal queue (as closure) for the incoming messages. The queue can be accessed by the callback.get() method. The callback.get() method returns the first message or raise the exception Queue.Empty. e.g. myCallback = generateDefaultCallback()
- try:
print myCallback.get()
- except Queue.Empty:
pass
- DIRAC.Resources.MessageQueue.Utilities.getDestinationAddress(mqURI)
- DIRAC.Resources.MessageQueue.Utilities.getDestinationName(mqURI)
- DIRAC.Resources.MessageQueue.Utilities.getDestinationType(mqURI)
- DIRAC.Resources.MessageQueue.Utilities.getMQParamsFromCS(mqURI)
Function gets parameters of a MQ destination (queue/topic) from the CS.
- DIRAC.Resources.MessageQueue.Utilities.getMQService(mqURI)