Hello All, I have a simple route which takes messages from an incoming queue, processes the message and writes it an outgoing queue. When I log the exchange.getIn().getBody() inside my processor, I see duplicates.
Here is the snippet of my route /MQQueueConnectionFactory cf = new MQQueueConnectionFactory(); // Config cf.setHostName("127.0.0.1"); cf.setPort(1414); cf.setTransportType(WMQConstants.WMQ_CM_CLIENT); cf.setQueueManager("TestQueueManager"); cf.setChannel("SYSTEM.DEF.SVRCONN"); cxt.addComponent("websphere-mq", JmsComponent.jmsComponent(cf)); cxt.addRoutes(new RouteBuilder() { public void configure() { from("websphere-mq:queue:incoming?concurrentConsumers=5").process(new FixProcessor()).to( "websphere-mq:queue:outgoing"); } });/ Here is the snippet of my processor /public void process(Exchange exchange) throws Exception { originalMessage = exchange.getIn().getBody(String.class); ExecutionTransform execTran = new ExecutionTransform(); LOG.info("originalMessage:" + originalMessage);/ Here is the snippet of sample message generator / MQQueueConnectionFactory cf = new MQQueueConnectionFactory(); // Config cf.setHostName("127.0.0.1"); cf.setPort(1414); cf.setTransportType(1); cf.setQueueManager("TestQueueManager"); cf.setChannel("SYSTEM.DEF.SVRCONN"); MQQueueConnection connection = (MQQueueConnection) cf.createQueueConnection(); MQQueueSession session = (MQQueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); MQQueue queue = (MQQueue) session.createQueue("queue:///incoming"); MQQueueSender sender = (MQQueueSender) session.createSender(queue); // Start the connection connection.start(); for(int i =0 ; i <100 ; i++){ String msg = "Test Message " + i; JMSTextMessage message = (JMSTextMessage) session.createTextMessage(msg); System.out.println(message.toString()); sender.send(message); }/ After I send 100 messages, I randomly get the originalMessage printed as duplicate. Can someone please what might be wrong with this? Thanks, Kishore. -- View this message in context: http://camel.465427.n5.nabble.com/Concurrent-Consumers-creating-duplicates-tp5764158.html Sent from the Camel - Users mailing list archive at Nabble.com.