On 10/28/2011 10:12 PM, Daryoush Mehrtash wrote:
I have a distributed QPID broker scenario that need to make sure messages
are received at-least-once in the remote clients.   I am trying to see if I
have to configure the brokers or not.

On the source broker I have:

  qpid-config -a SRC_BROKER add queue SRC_QUEUE


On Destination broker I set up the route and queues to read from

qpid-route queue add DEST_BROKER SRC_BROKER amq.fanout SRC_QUEUE

You probably want to add in --ack N to the qpid-route command. That will make transfer acknoweldeged, giving at-least-once guarantees between brokers.

[The N determines the frequency of acknowledgements; i.e. an acknowledgement will be sent every N messages. Lower values will reduce the size of the in-doubt window, higher values (up to a point, say around 200 or so) will generally increase throughput of the link.]

qpid-config -a DEST_BROKER add queue DEST_QUEUE
qpid-config -a DEST_BROKER bind amq.fanout DEST_QUEUE


I like to run the spout and drain apps in the python example.

spout SRC_QUEUE

drain  "DEST_QUEUE; {link:{reliability:"at-least-once"}}"


Questions:


a) Do I have to do anything on the "spout" to make sure the message has
at-least-once reliability>

It depends on what types of failure you wish the guarantee to survive for. If you want durability (i.e. the ability to recover messages if either broker is restarted) then the messages should be sent as persistent (and all queues they pass through should be made durable).

The spout example does not at present have a command line option for setting persistence but that is easy to add.

Apart from that you want to specify --reconnect to have it attempt to re-establish connection to the broker if lost and re-send any in-doubt messages.

For the queues you would add --durable to the qpid-config command for SRC_QUEUE and durable:True alongside the reliability option in your drain address.

[You also need to have the store plugin loaded].

b) Do I have to configure the Destination borker, or the route to make sure
all messages are sent to the broker.

Make sure you have acknowldeged transfer enabled between brokers and reconnect enabled on your publisher (spout in this case).

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to