2 Replies Latest reply on Oct 31, 2011 8:51 AM by davsclaus

    Camel Fuse ESB: HL7 Message to Mina HL7 Listener..Issue with OUT Time out

    sandy2011

      Hi,

      Please see the camel Route below.

      I am sending HL7 Message from a folder to tcp listener which listens for HL7 messages and sends response back a HL7 OK/Success message. I tested the listener using other HL7 editors and send a HL7 message and it responds back with a successful message.

       

      The issue is when I try to send a HL7 Message as below through Camel Route to the TCP Listener I get Time Out exception.

       

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

       

      Why does camel wait and I am not sure whether the Route is correct. It is a simple route just sending a HL7 Message from folder to TCP Listener.

       

       

          

       

      -


       

      0:33:17,792 | DEBUG | tered/dataforcsp | PipeParser                       | 126 - org.apache.servicemix.bundles.hapi - 0.5.1.3 | 0reps delimited by: ~

      10:33:17,792 | DEBUG | tered/dataforcsp | PipeParser                       | 126 - org.apache.servicemix.bundles.hapi - 0.5.1.3 | 1reps delimited by: ~

      10:33:17,792 | DEBUG | tered/dataforcsp | PipeParser                       | 126 - org.apache.servicemix.bundles.hapi - 0.5.1.3 | Parsing field 2 repetition 0

      10:33:17,792 | DEBUG | tered/dataforcsp | SendProcessor                    | 76 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | >>>> Endpoint[mina://tcp://XXX.XXx.XXX.XXX:61611] Exchange[null]

      10:33:17,792 | DEBUG | tered/dataforcsp | MinaProducer                     | 128 - org.apache.camel.camel-mina - 2.7.1.fuse-00-43 | Writing body : MSH|~\&|UG|XXX|||20111021090729.271||ADTA31|6345478484959933331|T|2.3|||NE|AL||ASCII

      EVN|A31|20111021090729.271|||13909ghgcav^^^^1^^^^^cav

      PID||14995388|T2237536|MERIDENMER|qwertypaul^^Mr||19800101000000.000|M|^^^^PG||23 RAODGATENorth^XXX 7QH|||||M||||||||||GB

      PD1|||STREET SURGERY^^1|G3211113

      PV1||E

       

      10:33:17,792 | DEBUG | rIoProcessor-0.0 | ExecutorFilter                   | 125 - org.apache.servicemix.bundles.mina - 1.1.7.3 | Launching thread for /XX.XXX.XXX:61611

      10:33:17,792 | DEBUG | tered/dataforcsp | MinaProducer                     | 128 - org.apache.camel.camel-mina - 2.7.1.fuse-00-43 | Waiting for response using timeout 30000 millis.

      10:33:17,792 | DEBUG | - MinaThreadPool | ExecutorFilter                   | 125 - org.apache.servicemix.bundles.mina - 1.1.7.3 | Exiting since queue is empty for /XX.XXX.XXX:61611

      10:33:22,136 | DEBUG | nitor WriteCheck | InactivityMonitor                | 48 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | org.apache.activemq.transport.InactivityMonitor$2@1dba43d 10000 ms elapsed since last write check.

      10:33:22,136 | DEBUG | nitor WriteCheck | InactivityMonitor                | 48 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | org.apache.activemq.transport.InactivityMonitor$2@fbcbcd 10000 ms elapsed since last write check.

      10:33:22,401 | DEBUG | heckpoint Worker | MessageDatabase 

       

      -


      ..................

       

      0:33:47,589 | DEBUG | heckpoint Worker | MessageDatabase                  | 48 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | Checkpoint started.

      10:33:47,620 | DEBUG | heckpoint Worker | MessageDatabase                  | 48 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | Checkpoint done.

      10:33:47,807 | DEBUG | tered/dataforcsp | DefaultErrorHandler              | 76 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Failed delivery for exchangeId: ID-GHG-KEW-SIT-C1-3296-1320056644120-4-38. On delivery attempt: 0 caught: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis. Exchange[null]

      10:33:47,807 | ERROR | tered/dataforcsp | DefaultErrorHandler              | 76 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Failed delivery for exchangeId: ID-GHG-KEW-SIT-C1-3296-1320056644120-4-38. Exhausted after delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The OUT message 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)[128:org.apache.camel.camel-mina:2.7.1.fuse-00-43]

           at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[76:org.apache.camel.camel-core:2.7.1.fuse-00-43]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:80)[76:org.apache.camel.camel-core:2.7.1.fuse-00-43]

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

           at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[76:org.apache.camel.camel-core:2.7.1.fuse-00-43]

           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[76:org.apache.camel.camel-core:2.7.1.fuse-00-43]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:80)[76:org.apache.camel.camel-core:2.7.1.fuse-00-43]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[76:org.apache.camel.camel-core:2.7.1.fuse-00-43]

           at

       

      -


       

        • 1. Re: Camel Fuse ESB: HL7 Message to Mina HL7 Listener..Issue with OUT Time out
          sandy2011

          Hi Adding to that I have similar issue when consuming from Mina end point and sending to JMS Queue

           

           

           

           

          -


          org.apache.servicemix.bundles.mina - 1.1.7.3 | Launching thread for /151.46.220.183:1457

          11:55:07,383 | DEBUG | - MinaThreadPool | MinaConsumer                     | 123 - org.apache.camel.camel-mina - 2.7.1.fuse-00-43 | Received body: MSH|~\&|ULTRAGENDAPRO|xxx|||20111021090729.271||ADTA31|634547848495993671|T|2.3|||NE|AL||ASCII

          EVN|A31|20111021090729.271|||13909ghgcav^^^^1^^^^^hhhcav

          PID||14995388|T2237535|MERIDENMER|qwertypall^^Mr||19800101000000.000|M|^^^^PG||23 west RoadGATEshire^xxx 7sH|||||M||||||||||GB||||

          PD1|||STREET SURGERY^^1|G3250335

          PV1||E

          11:55:07,398 | DEBUG | - MinaThreadPool | SendProcessor                    | 76 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | >>>> Endpoint[jms://incomingOrdersTwo] Exchange[Message: MSH|~\&|ULTRAGENDAPRO|xxx|||20111021090729.271||ADTA31|634547848495993671|T|2.3|||NE|AL||ASCII

          EVN|A31|20111021090729.271|||13909hhhcav^^^^1^^^^^hhhcav

          PID||14995388|T2237536|MERIDENMER|qwertypaul^^Mr||19800101000000.000|M|^^^^PG||23 RoadGATEshire^xxx 7QH|||||M||||||||||GB||||

          PD1||| STREET SURGERY^^1|G3250183

          PV1||E]

          11:55:07,445 | DEBUG | - MinaThreadPool | DefaultManagementAgent           | 76 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Registered MBean with objectname: org.apache.camel:context=SIT-CA/127-camel-6,type=threadpools,name="JmsReplyManagerTimeoutChecker[incomingOrdersTwo]"

          -


           

          KEW-SIT-CA-1447-1320062074789-1-2 (times out after 20000 millis)

          11:55:27,774 | DEBUG | comingOrdersTwo] | DefaultErrorHandler              | 76 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Failed delivery for exchangeId: ID-SIT-CA-1447-1320062074789-1-3. On delivery attempt: 0 caught: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 20000 millis. Exchange[Message:

          -


           

          Edited by: sandy2011 on Oct 31, 2011 12:12 PM

          • 2. Re: Camel Fuse ESB: HL7 Message to Mina HL7 Listener..Issue with OUT Time out
            davsclaus

            You have enabled mina in InOut mode, which means you intend to return a reply? Do you want to do that?

             

            If not disable that by setting sync=false.

             

            Camel supports Message Exchange Pattern (MEP) in either

            - InOnly

            - InOut

             

            So if sync=true => InOut, sync=false => InOnly.

             

            The same thing is when you send the message to the message queue. If MEP is InOut then the JmsProducer expects a reply, and you get this 20 sec timeout exception.

             

            For that you can force InOnly mode. See details at

            http://camel.apache.org/request-reply.html