On 04/09/2014 07:50 PM, Tor Rune Skoglund wrote:
There would have to be queueing in and out on all devices and the server
(B). B can accept responsibility as "storage proxy". If there is a
message from A to C, B would enqueue it for delivery to C. Then A can
dequeue it as soon as B holds it.

In that case, one option is to use 0-10 based federation between brokers on A, B and C (more generally, assuming I understand your setup, have a broker on all 'client' machines accessible only to local processes, and one publicly accessible one on B.

For example, lets assume that each client has a single unique address of its own through which it can be individually contacted. For a client A you would then setup the routing for incoming messages:

  qpid-config -b BrokerA --durable add exchange fanout incoming_x
  qpid-config -b BrokerA --durable add queue incoming_q
  qpid-config -b BrokerA bind incoming_x incoming_q
  qpid-config -b BrokerB --durable add queue A
  qpid-config -b BrokerB bind amq.topic A A

  qpid-route --durable --ack 10 queue add BrokerA BrokerB incoming_x A

and outgoing messages:

  qpid-config -b BrokerA --durable add queue outgoing_q
  qpid-config -b BrokerA bind amq.topic outgoing_q '#'

qpid-route --durable --ack 10 --src-local queue add BrokerB BrokerA amq.topic outgoing_q

Now the application on A can connect to its local broker, receive incoming messages from 'incoming_q' and send to any other client via a sender to amq.topic/X where X is the other clients address (alternatively use one sender to amq.topic, and set the subject of the message to the name of the other client). The broker on A only needs to be accessible locally, broker B won't need to connect to it.

Messages will be queued at every stage (on the outgoing_q of sending 'client', then on the 'client' specific queue on the public broker, then on the incoming_q of the receiving 'client'). I've kept the queues simple, i.e. using the defaults, but they could be customised to handle buildup of messages in different ways (e.g. dropping older messages, blocking senders etc) and sized to the expected needs of the system.

All other clients would repeat the steps above, but replace A with whatever their identifier was (e.g. C). These should only need to be done once, i.e. as part of the provisioning of the machine.

It would be fairly easy to add small enhancements to the addressing scheme - e.g. a broadcast address for message to be received by all clients.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to