Hi I created an unit test which you can take a look at. It uses the IN selector http://svn.apache.org/viewvc?rev=1176348&view=rev
On Tue, Sep 27, 2011 at 1:58 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > On Mon, Sep 26, 2011 at 6:05 PM, kal2420 <kalpi...@cisco.com> wrote: >> Thanks Claus, >> >> I got busy with work, and I am just getting back to camel. I did try >> looking into event-driven-consusmer, What i really want is to configure >> dynamic selector on activemq queue. Here is how I am trying to configure >> dynamic selector, please tell me if this is correct: >> >> // once all routes are up and running >> // set selector on jms endpoint >> CamelContext ctx = getContext(); >> JmsEndpoint endpoint = >> ctx.getEndpoint("activemq://queue:test-1",JmsEndpoint.class); >> // String selector = "userid='test12'"; // also tried with %3D url format >> String selector = "userid IN ('test12' , 'terst234'); >> endpoint.setSelector(selector); >> > > So you have a route with that particular endpoint > from(endpoint).to("xxx") > > > The selector should use a SQL like syntax. I actually do not know if > ActiveMQ has an logging to WARN/ERROR level > if the syntax is invalid. > > > >> Issue: I am seeing all messages being processed, while i only want to >> process messages where i have userid header value set to 'test12' or >> 'terst234' >> >> Thanks >> Kal >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Activemq-dynamic-endpoint-configuration-tp4749853p4841926.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/