You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by xavier <xa...@eaton.com> on 2016/03/11 16:47:26 UTC

filter (selector?)

Hi all,

I work on a project who use qpid messaging to dialogue in AMQP.
I have a question about selector (to do request/reply pattern), I want
retrieve a message on a queue 
or topic but with a filter (selector?), like correlation_id = '123456789',
do you have any documentation about this, please?

The another is, the better way (performance) to do the request/reply is:

 1- using the correlation_id, 
or 
 2- using temporary queue (and using the destination queue, for the
replyer).


Thanks for the help.

Regards





--
View this message in context: http://qpid.2158936.n2.nabble.com/filter-selector-tp7639961.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: filter (selector?)

Posted by xavier <xa...@eaton.com>.
Thank you for the help

Regards



--
View this message in context: http://qpid.2158936.n2.nabble.com/filter-selector-tp7639961p7640033.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: filter (selector?)

Posted by Gordon Sim <gs...@redhat.com>.
On 11/03/16 15:47, xavier wrote:
> Hi all,
>
> I work on a project who use qpid messaging to dialogue in AMQP.
> I have a question about selector (to do request/reply pattern), I want
> retrieve a message on a queue
> or topic but with a filter (selector?), like correlation_id = '123456789',
> do you have any documentation about this, please?
>
> The another is, the better way (performance) to do the request/reply is:
>
>   1- using the correlation_id,
> or
>   2- using temporary queue (and using the destination queue, for the
> replyer).

Personally, I would lean towards the second option. Once you have your 
temporary queue, you can use it for many requests. If you are using a 
selector then either you need to use the same correlation-id for all 
your requests (rather than allowing you to use it to identify a specific 
request) or you need to recreate the subscription (and hence selector) 
for every request.

I would guess the second option would be at least as performant also, 
though I haven't actually measured the two for any real workload.

Using qpid::messaging in c++, you can set a selector through the address 
passed to the receiver:

   "foo; {link:{selector:\"amqp.correlation_id = '123456789'\"}}"

with the new c++ api in proton it would (based on the seletced_recv.cpp 
example) be:

    conn.open_receiver(url.path(), 
proton::link_options().selector("amqp.correlation_id = '123456789'"));

The above assumes you are using the c++ broker. ActiveMQ and the Qpid 
java broker rely on JMS names, so instead of amqp.correlation_id you 
would use JMSCorrelationID.

(The c++ broker has been updated to recognise these JMS identifiers 
also, but that has not yet been released: 
https://issues.apache.org/jira/browse/QPID-6714).


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


Re: filter (selector?)

Posted by xavier <xa...@eaton.com>.
Hi,

I would like using the Qpid Proton C++ lib (the latest (0.12.0)), and I
would like to have the amqp 1.0 compliant. 
The amqp 1.0 would allow me to have a connection with activeMq (my broker
for the moment), and with perhaps in the futur with the qpid broker.

Thank you for your help.

Regards



--
View this message in context: http://qpid.2158936.n2.nabble.com/filter-selector-tp7639961p7639991.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: filter (selector?)

Posted by Rob Godfrey <ro...@gmail.com>.
Can you give a little more detail about which clients (C++/Java/Python/etc)
you'd be looking to use, and whether you are looking to use AMQP 1.0 or an
earlier version (or you have no preference),

Thanks,
Rob

On 11 March 2016 at 15:47, xavier <xa...@eaton.com> wrote:

> Hi all,
>
> I work on a project who use qpid messaging to dialogue in AMQP.
> I have a question about selector (to do request/reply pattern), I want
> retrieve a message on a queue
> or topic but with a filter (selector?), like correlation_id = '123456789',
> do you have any documentation about this, please?
>
> The another is, the better way (performance) to do the request/reply is:
>
>  1- using the correlation_id,
> or
>  2- using temporary queue (and using the destination queue, for the
> replyer).
>
>
> Thanks for the help.
>
> Regards
>
>
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/filter-selector-tp7639961.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>