I'm trying to write an integration test where some error condition happens, a
retry policy kicks in, and eventually the message ends up back on the queue.
I'm using the CamelSpringTestSupport to do this. 

The thing I want to throw an exception is a bean, and as I understand you
can't swap these out using advice, I simply wire in a stub one in my spring
config. All good so far.

In semi psuedo-code the test looks something like this:

    @Produce(uri = CONSUMER_ENDPOINT)
    protected ProducerTemplate template;

test {
template.sendBodyAndHeader(xyz);
Object message consumer.receiveBodyNoWait(CONSUMER_ENDPOINT, Object.class);
}

What I'm trying to achieve is send the message then check the queue
afterwards. But Camel is telling me that I'm trying to put another consumer
on the same endpoint. How would you normally go about testing such a
scenario?

Thanks,
Michael


--
View this message in context: 
http://camel.465427.n5.nabble.com/Checking-a-message-is-back-on-the-queue-tp5489222p5489222.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to