[ 
https://issues.apache.org/activemq/browse/CAMEL-2529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved CAMEL-2529.
---------------------------------

    Resolution: Fixed

committed patch for it.

> ConsumerTemplate don't support the jms uri with selector
> --------------------------------------------------------
>
>                 Key: CAMEL-2529
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2529
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 2.0.0, 2.1.0, 2.2.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.3.0
>
>
> This unit test can shows the issue that selector option don't work for 
> ConsumerTemplate
> {code}
> @Test
>     public void testConsumerTemplate() throws Exception {
>         template.sendBodyAndHeader("activemq:queue:consumer", "Message1", 
> "SIZE_NUMBER", 1505);
>         template.sendBodyAndHeader("activemq:queue:consumer", "Message3", 
> "SIZE_NUMBER", 1300);
>         template.sendBodyAndHeader("activemq:queue:consumer", "Message2", 
> "SIZE_NUMBER", 1600);
>         // process every exchange which is ready. If no exchange is left break
>         // the loop
>         while (true) {
>             Exchange ex = 
> consumer.receiveNoWait("activemq:queue:consumer?selector=SIZE_NUMBER<1500");
>             if (ex != null) {
>                 Message message = ex.getIn();
>                 int size = message.getHeader("SIZE_NUMBER", int.class);
>                 assertTrue("The message header SIZE_NUMBER should be less 
> than 1500", size < 1500);
>                 assertEquals("The message body is wrong", "Message3", 
> message.getBody());
>             } else {
>                 break;
>             }
>         }
>     }
> {code}
> And here is [mail 
> thread|http://old.nabble.com/activemq-component-and-selector-ts27813752.html] 
> which discusses about it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to