You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by axdz <ho...@gmail.com> on 2016/09/29 02:53:15 UTC
Selector multiple field in header
Hi all,
I have a problem with selector activemq
I have a queue with name A . I sent to this queue with some messages.All
these message have field a1,a2,a3 in their header.
I found solution for selector with one field as
from("activemq:A?selector=a1='valuea1'").to("endpoint")
Now,I want to select with multiple field as a1='value1' and a2='value2'.
Plsease give me some advice.
Thanks,
--
View this message in context: http://camel.465427.n5.nabble.com/Selector-multiple-field-in-header-tp5788180.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Selector multiple field in header
Posted by axdz <ho...@gmail.com>.
Thank you so much.It worked!!
--
View this message in context: http://camel.465427.n5.nabble.com/Selector-multiple-field-in-header-tp5788180p5788232.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Selector multiple field in header
Posted by DariusX <da...@gmail.com>.
You should be able to set it to something that looks like it belongs in a SQL
where clause. See this: http://activemq.apache.org/selectors.html
One thing to look out for is that you may need to escape some characters,
depending on the context where you place them.
--
View this message in context: http://camel.465427.n5.nabble.com/Selector-multiple-field-in-header-tp5788180p5788185.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Selector multiple field in header
Posted by Claus Ibsen <cl...@gmail.com>.
You can read about ActiveMQ selectors here:
http://activemq.apache.org/selectors.html
On Thu, Sep 29, 2016 at 4:53 AM, axdz <ho...@gmail.com> wrote:
> Hi all,
>
> I have a problem with selector activemq
>
> I have a queue with name A . I sent to this queue with some messages.All
> these message have field a1,a2,a3 in their header.
>
> I found solution for selector with one field as
> from("activemq:A?selector=a1='valuea1'").to("endpoint")
>
>
> Now,I want to select with multiple field as a1='value1' and a2='value2'.
>
> Plsease give me some advice.
> Thanks,
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Selector-multiple-field-in-header-tp5788180.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2