2 Replies Latest reply on Nov 1, 2011 9:42 AM by sandy2011

    Camel Mina HL7 Publish message Response Out Message exceptionn

    sandy2011

      Hi,

      I have a simple Route which picks up HL7 message from a folder and publishes to a TCP Listener. The Listener consumes the HL7 Message and sends a HL7 message as response.

      I have to set the mina options sync=true since the listener sends a response back.

      -


      from("file:src/data?noop=true")

                  .convertBodyTo(String.class)

                .marshal(hl7)

               .to("mina:tcp://151.46.220.183:61611?sync=true");

      -


      I am not sure why the listener is not consuming the message published by the camel route and camel route throws the following exception.

      It seems to have TIMED OUT waiting to receive a response.

       

      The listener works fine and I have tested it by sending a HL7 message through a HL7 Editor and it sends a HL7 Response.

       

      So I have a feeling I am not trapping the response from the Listener properly using Camel Route.

      Can you please suggest what needs to be added to the camel Route above..?

       

       

       

      -


      hanges to complete, timeout in 287 seconds.

      DefaultShutdownStrategy        INFO  Waiting as there are still 1 inflight and pending exc

      hanges to complete, timeout in 286 seconds.

      1) thread #0 - file://src/data DefaultErrorHandler            ERROR Failed delivery for exchangeId: ID--KEW-SIT-CA-276

      2-1320152360990-0-4. Exhausted after delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The OUT messag

      e was not received within: 30000 millis. Exchange[null]

      org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis. Exchange[null]

              at org.apache.camel.component.mina.MinaProducer.process(MinaProducer.java:127)[camel-mina-2.7.1.jar:2.7.1]

              at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcess

      orTypeConverter.java:50)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[camel-core-2.7.1.jar:2.7.1]

       

              at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.1.j

      ar:2.7.1]

              at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.1.jar:2

      .7.1]

              at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[camel-core-2.7.1.

      jar:2.7.1]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.1.j

      ar:2.7.1]

              at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.1.jar:2

      .7.1]

              at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[camel-core-2.7.1.jar:2

      .7.1]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]

              at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[camel-cor

      e-2.7.1.jar:2.7.1]

              at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[camel-core-2.7.1.jar: