Testing of routes using Camel 1.6
Hi I need to write unit test cases for some camel routes using (Version 1.6) Can anyone please suggest if it is possible to mock components(processor and idempotentConsumer) inside the route? If yes, please suggest the approach. Below is the route snippet from("direct:someuri").process(someClassObject). idempotentConsumer(header("someHeadername"),socratesMessageIdRepository(bean(JpaTemplate.class)))./*process(exceptionProcessor)*/ to(someQueues); -- View this message in context: http://camel.465427.n5.nabble.com/Testing-of-routes-using-Camel-1-6-tp5725026.html Sent from the Camel Development mailing list archive at Nabble.com.
Re: Testing of routes using Camel 1.6
Thanks for Updation.Yes Camel 2.x and above version support this route component testing,but i need to test using Camel 1.6 ,so please if you can suggest some examples or is it infeasible to test using Camel 1.6. -- View this message in context: http://camel.465427.n5.nabble.com/Testing-of-routes-using-Camel-1-6-tp5725026p5725040.html Sent from the Camel Development mailing list archive at Nabble.com.
Handling Message failure on Container
I am applying Idempotent logic for filtering duplicate message.If message is persisted to table like store_message_processed which contain unique messages and container fails while sending message due to some validation.I want to know if i send that message again but my table will contain unique hashcode for that message then it will not send that message again to container.So what should i do so message does not get lost and it should be forwarded to activemq queue. -- View this message in context: http://camel.465427.n5.nabble.com/Handling-Message-failure-on-Container-tp5732259.html Sent from the Camel Development mailing list archive at Nabble.com.
JPA transaction roll back
Hi .I am implementing idempotent consumer pattern for filtering duplicate message. When i am creating a new record in database and when i run the service mix container i get error on container something like this:-- Failed to commit.Jpa transaction rollback. My logic:- LOGGER.info("@processenter@@@"); final Message in = exchange.getIn(); LOGGER.info("@processente1"); final Customer message =in.getHeader(CUSTOMER_NUMBER, Customer.class); //final Customer message = in.getBody(Customer.class); LOGGER.info("@processenterr2"); message.setCustomerUpdatedDate(DateUtils.getCurrentDate()); LOGGER.info("message got"); exchange.getOut().setBody(message,Customer.class); Container is printing 2 log processenter and process enter 1 and after then container is breaking and no log message is coming.I have flushed the template also. Please can u advice me on this. -- View this message in context: http://camel.465427.n5.nabble.com/JPA-transaction-roll-back-tp5733006.html Sent from the Camel Development mailing list archive at Nabble.com.