edeposit_amqp_tool.py script

AMQP tool used for debugging and automatic RabbitMQ schema making.

edeposit_amqp_tool.create_blocking_connection(*args, **kwargs)[source]

Return properly created blocking connection.

Parameters:host (str) – Host as it is defined in get_amqp_settings().

Uses edeposit.amqp.amqpdaemon.getConParams().

edeposit_amqp_tool.create_schema(host)[source]

Create exchanges, queues and route them.

Parameters:host (str) – One of the possible hosts.
edeposit_amqp_tool.get_list_of_hosts()[source]
Returns:List of strings with names of possible hosts.
Return type:list
edeposit_amqp_tool.main()[source]
edeposit_amqp_tool.receive(host, timeout)[source]

Print all messages in queue.

Parameters:
  • host (str) – Specified –host.
  • timeout (int) – How log should script wait for message.
edeposit_amqp_tool.send_message(host, data, timeout=None, properties=None)[source]

Send message to given host.

Parameters:
  • host (str) – Specified host: aleph/ftp/whatever available host.
  • data (str) – JSON data.
  • timeout (int, default None) – How much time wait for connection.
edeposit_amqp_tool.test_virtualhost(fn)[source]