On 03/02/2012 05:57 PM, Gordon Sim wrote:
On 03/02/2012 03:14 PM, Davide Anastasia wrote:
Hi Jakub,
Thanks a lot for your help: it really helped me a lot. However, I
couldn't find a way to filter messages using their subject. For
instance, I created my queue with the name "ticker" and then I sent
messages using routing_key like "instr1", "instr2", and so on.
Unfortunately, on the receiver side I still receive all the messages.
http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-CPP-Book/html/ch01s06.html
is the correct link to use for anything since the Qpid 0.10 release. The
older content is now out of date and describes deprecated behaviour.
And more specifically, did you configure your queue as an LVQ? You can't
(at present) key on the routing key itself, but if you are using the
qpid::messaging API (whether in c++ or python) then you can use
'qpid.subject' as a substitute.
E.g.
qpid-config add queue ticker --argument
qpid.last_value_queue_key=qpid.subject
then e.g.
spout --content a1 ticker/instr1
spout --content a2 ticker/instr2
spout --content b1 ticker/instr1
etc, and the queue will hold the last values of each instrument. You can
set up browsers on the queue that will get the latest set and then any
further updates. E.g.
drain 'ticker; {mode: browse}'
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]