qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Bidirectional route combined with binding to queue
Date Mon, 22 Jan 2018 14:13:26 GMT
On 22/01/18 13:24, andi welchlin wrote:
> Hello all,
> I want to share an exchange between two brokers (bidirectional).
> I understood that the right way to do this is using a dynamic route like:
> qpid-route dynamic add $broker1 $broker2 $exchange_name
> qpid-route dynamic add $broker2 $broker1 $exchange_name
> I also want to achieve that no messages will be lost when one of the
> two brokers is down while messages are sent to the other broker.
> So I would bind a queue ($queue_out) to $exchange_name on both brokers.
> Then I would route on each broker $queue_out to the exchange of the remote
> broker.
> As far as I understood a dynamic route is then not possible any more.
> It would look like:
> # install binding from exchange to output queue
> qpid-config -b $BROKER1 bind $exchange_name $queue_out
> qpid-config -b $BROKER2 bind $exchange_name $queue_out
> # install route
> qpid-route -d queue add $BROKER2 $BROKER1 $exchange_name $queue_out
> qpid-route -d queue add $BROKER1 $BROKER2 $exchange_name $queue_out
> qpid-route route map $BROKER2
> But this seems to lead to circular messages.
> Does anyone have a solution for this scenario?

You can use the "qpid.trace.id" and "qpid.trace.exclude" queue options 
for this.

For each of the two forwarding queues, set the id to the name of the 
broker the queue is on and set the excludes to a list containing the 
other brokers id.

That way messages from the other broker are not enqueued on the 
forwarding queue, so will not get forwarded back.

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message