Hello, I have a use case to pick up a message from source JMS queue and route it to bunch of other JMS destination queues. In order to test transaction I have followed Camel in Action, steps described in Chapter 9 (Using Transactions), with embedded ActiveMQ etc. I have an interceptor like below.
Endpoint sourceQendPoint = sourceQueue.getDefaultEndpoint(); RouteBuilder rb = new RouteBuilder(){ public void configure() throws Exception{ interceptSendToEndpoint("activemq:queue:destinationQueue1") .throwException(new JMSException("Cannot publish to destinationQueue1")); } }; RouteDefinition customRoute = camelContext.getRouteDefinition("route1"); customRoute.adviceWith((ModelCamelContext)camelContext, rb); template.sendBody(sourceQendPoint ,"Message changed"); Thread.sleep(3000); //"activemq:queue:ActiveMQ:DLQ" Object body = consumer.receiveBodyNoWait("activemq:queue:ActiveMQ.DLQ"); assertNotNull("should not lose message",body); This assert doesn't work. Dead letter queue is empty as well. Anything that I may have missed in setting this test case up? -- View this message in context: http://camel.465427.n5.nabble.com/Transacted-test-case-with-ActiveMQ-not-working-tp5666012p5666012.html Sent from the Camel - Users mailing list archive at Nabble.com.