AMQP service

The AMQPClientService is responsible for connecting the client to the AMQP bus, registers the required queues, listens for commands on that queues and dispatches incoming commands to the clacks.client.command.CommandRegistry.


In contrast to the clacks agent, every client only has a single queue. It is constructed of these components:


For external calls it makes use of the clacks.common.components.amqp_proxy.AMQPServiceProxy, so it will construct additional temporary reply queues as needed.


The clacks client produces a ClientAnnounce event on startup which tells interested agents about the client capabilities (commands it provides) and some hardware information.

This information is re-send when the client receives a ClientPoll event, which is generated by an agent node which is not able to get client information from other agent nodes (i.e. if it’s the only one).

On client shutdown, a ClientLeave is emitted to tell the agents that the client has passed away.

class clacks.client.amqp_service.AMQPClientService

Internal class to serve all available queues and commands to the AMQP broker.

commandReceived(ssn, message)

Process incoming commands, coming in with session and message information.

Parameter Description
ssn AMQP session object
message Received AMQP message

Incoming messages are coming from an clacks.common.components.amqp_proxy.AMQPServiceProxy which is providing a reply to queue as a return channel. The command result is written to that queue.


Re-announce signature changes to the agent.

This method waits a given amount of time and then sends re-sends the client method-signatures.


Start AMQP service for this clacks service provider.