camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dragisa Krsmanovic <>
Subject Re: ActiveMQ 5.3.0 and PollingConsumer
Date Mon, 14 Dec 2009 18:28:35 GMT
Here is more details.

On Fri, 2009-12-11 at 10:42 -0800, Dragisa Krsmanovic wrote:
>   @Test
>   @DirtiesContext
>   public void test() throws InterruptedException {
>     endpoint.setResultWaitTime(10000l);
>     endpoint.expectedMessageCount(1);
>     endpoint.message(0).body().isEqualTo("foo/bar/");
>     inQueue.sendBody("foo");
>     inQueue.sendBody("bar");
>     start.sendBody("start");
>     endpoint.assertIsSatisfied();
>   }

It seems that scenario where a bean in one route consumes messages in
another queue fails with Camel + ActiveMQ 5.3.0

If I directly consume messages in my test method. The test will succeed.

  public void test2() throws InterruptedException {

    Exchange exchange;
    int count = 0;
    while ((exchange = consumerTemplate.receive(inEndpoint, 2000l)) !=
null) {

    assertEquals(count, 2);


Dragisa Krsmanovic
Java Developer
Public Library of Science

This email is confidential to the intended recipient. If you have received it in error, please
notify the sender and delete it from your system. Any unauthorized use, disclosure or copying
is not permitted. The views or opinions presented are solely those of the sender and do not
necessarily represent those of Public Library of Science unless otherwise specifically stated.
Please note that neither Public Library of Science nor any of its agents accept any responsibility
for any viruses that may be contained in this e-mail or its attachments and it is your responsibility
to scan the e-mail and attachments (if any).

View raw message