Proton Python API / Subject Filtering with Queues the AMQP 0.10 way

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Proton Python API / Subject Filtering with Queues the AMQP 0.10 way

kristianraue
This might be similar to http://qpid.2158936.n2.nabble.com/Subject-Filtering-with-Queues-td7608978.html.

I would like to use "create_receiver" of the Proton Python API (0.17.0) to subscribe to a topic queue on a Qpdi C++ broker (1.36.0) .

There I want to do something similar to AMQP 0.10 in the form of [Queuename]/[subjectfilter] ("for example:  "news-service/*.news") where "news-service" would be a queue and "*.news" would be a topic/routing filter.  I would like to subscribe to all messages in news-service with a subject that match the routing filter *.news.

Is there meanwhile (the above post is from 2014) an (easy) way to do this? I would be very grateful for a syntax sample.

Kristian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proton Python API / Subject Filtering with Queues the AMQP 0.10 way

Gordon Sim
On 23/05/17 16:50, kristianraue wrote:

> This might be similar to
> http://qpid.2158936.n2.nabble.com/Subject-Filtering-with-Queues-td7608978.html
> <http://qpid.2158936.n2.nabble.com/Subject-Filtering-with-Queues-td7608978.html>
> .
>
> I would like to use "create_receiver" of the Proton Python API (0.17.0) to
> subscribe to a topic queue on a Qpdi C++ broker (1.36.0) .
>
> There I want to do something similar to AMQP 0.10 in the form of
> [Queuename]/[subjectfilter] ("for example:  "news-service/*.news") where
> "news-service" would be a queue and "*.news" would be a topic/routing
> filter.  I would like to subscribe to all messages in news-service with a
> subject that match the routing filter *.news.
That is not actually how AMQP 0-10 works; the different kinds of subject
filtering were defined on exchanges, not on queues. However...

> Is there meanwhile (the above post is from 2014) an (easy) way to do this? I
> would be very grateful for a syntax sample.

Attached are two examples: select_subject.py uses a selector,
filter_subject.py uses an AMQP 0-10 style 'binding key'. Both examples
use mynode which can be either a queue or a topic-exchange, depending on
the actual behaviour you want.



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

select_subject.py (1K) Download Attachment
filter_subject.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proton Python API / Subject Filtering with Queues the AMQP 0.10 way

kristianraue
This was exactly what I was looking for. Works perfectly.

Thank you (also for putting me right on the wording)!

Kristian
Loading...