camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: NotifyBuilder condition fails to match on an out/activemq endpoint
Date Sun, 14 Aug 2011 11:54:01 GMT

On Fri, Aug 12, 2011 at 1:11 PM, jason.parr <> wrote:
> What I'm trying to do is use my 'production' route unchanged within the test
> - or as close as possible.
> My application has a couple of input jms queues and two output queues, one
> for successful messages the other is an error queue. I send messages via jms
> into the route from pre-recorded messages stored in files and accessed by
> the file component.
> I want to run my test and check that the output queues have exactly the
> correct amount of messages on them that I expected. I could change the 'out'
> jms queue endpoints to be mocks but I'd rather they really are jms endpoints
> configured to use an embedded activemq broker, as this is as close to real
> deployment as possible.
> So something like:
>    whenExactlyDone(5).wereSentTo("jms:good-msgs")
>      .and()
>    whenExactlyDone(1).wereSentTo("jms:bad-msgs").create();

I have just implemented this as a new feature in Camel 2.9. This is
from an unit test

        // we expect 2+ done messages which were sent to mock:bar
        // and 1+ failed message which were sent to mock:fail
        NotifyBuilder notify = new NotifyBuilder(context)

> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message