StompMQConnector

Class for management of Stomp MQ connections, e.g. RabbitMQ

class DIRAC.Resources.MessageQueue.StompMQConnector.StompMQConnector(parameters={})

Bases: DIRAC.Resources.MessageQueue.MQConnector.MQConnector

Class for management of message queue connections Allows to both send and receive messages from a queue

__init__(parameters={})

Standard constructor

connect(parameters=None)
Parameters:parameters (dict) – dictionary with additional parameters if any
Returns:S_OK/S_ERROR
disconnect(parameters=None)

Disconnects from the message queue server

put(message, parameters=None)

Sends a message to the queue message contains the body of the message

Parameters:message (str) – string or any json encodable structure
setupConnection(parameters=None)
Parameters:parameters (dict) – dictionary with additional MQ parameters if any
Returns:S_OK/S_ERROR
subscribe(parameters=None)

Subscribes to the message queue server :param dict parameters: dictionary with additional parameters if any :return: S_OK/S_ERROR

unsubscribe(parameters)

Subscribes to the message queue server :param dict parameters: dictionary with additional parameters if any :return: S_OK/S_ERROR