MQCommunication

General Message Queue Interface to create Consumers and Producers

DIRAC.Resources.MessageQueue.MQCommunication.createConsumer(mqURI, callback=<function callback>)

Function creates MQConsumer. All parameters are taken from the Configuration Service based on the mqURI value.

Parameters:
  • mqURI (str) – Pseudo URI identifing MQ service. It has the following format mqConnection::DestinationType::DestinationName e.g. blabla.cern.ch::Queue::MyQueue1
  • callback – callback function that can be used to process the incoming messages
Returns:

with the consumer object in S_OK.

Return type:

S_OK/S_ERROR

DIRAC.Resources.MessageQueue.MQCommunication.createProducer(mqURI)

Function creates MQProducer. All parameters are taken from the Configuration Service based on the mqURI value.

Parameters:mqURI (str) – Pseudo URI identifing MQ service. It has the following format mqConnection::DestinationType::DestinationName e.g. blabla.cern.ch::Queue::MyQueue1
Returns:with the producer object in S_OK.
Return type:S_OK/S_ERROR