Andrew Wright wrote:
Hi all,
I've been watching this thread with interest (partially in the hope of
an example as well!) An example of atomic update of direct bindings
does sound very interesting. Is it possible to get at this from Java?
(Pure JMS not a requirement).
Andrew,
yes, when you do the queue declare you mark the binding as exclusive.
Then additional bindings matching are atomically replaced. This can be
done from any client against the C++ broker
FieldTable args;
args.setInt("qpid.exclusive-binding",1);
//the following will cause the only binding from amq.direct with 'my-key'
//to be the one to 'my-queue'; if there were any previous bindings for that
//key they will be removed. This is atomic w.r.t message routing through the
//exchange.
session.exchangeBind(arg::exchange="amq.direct", arg::queue="my-queue",
arg::bindingKey="my-key", arg::arguments=args);
This is taken from
http://cwiki.apache.org/confluence/display/qpid/Cheat+Sheet+for+configuring+Exchange+Options
regards,
Carl.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]