Hello

Our camel integrated-application gets messages from ActiveMQ and delivers it
to a consuming-application.

Because of network glitches, sometimes, the consuming-application is not
available for a while. Even the consuming-application is online  again, the
camel-integrated application fails to reconnect and resume the last message.

The camel version is 2.17.3

Is there anyway to force camel to reconnect or invalidate the session?

Thanks in advance.

The error look like this:

[Cannot write body: byte[] using session: (0x000001A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null).
Exchange[ID-the-Host-34071-1487843214861-0-829]] [java.io.IOException:
Cannot write body: byte[] using session: (0x000001A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null).
Exchange[ID-the-Host-34071-1487843214861-0-829]
        at
country.firm.integration.route.bean.RouteTemplate.send(RouteTemplate.java:69)
        at
country.firm.integration.route.bean.BaseDispatcherBean.sendToInOutEndpoint(BaseDispatcherBean.java:171)
        at
country.firm.integration.route.bean.DispatcherBean.sendMessageTcpOrHl7(DispatcherBean.java:452)
        ...
        ...
        ...
Caused by: org.apache.camel.CamelExchangeException: 
      Cannot write body: byte[] using session: (0x000001A0: nio socket,
client, 0.0.0.0/0.0.0.0:53340 => null). 
          Exchange[ID-the-Host-34071-1487843214861-0-829]
        at
org.apache.camel.component.mina2.Mina2Helper.writeBody(Mina2Helper.java:58)
        at
org.apache.camel.component.mina2.Mina2Producer.doProcess(Mina2Producer.java:166)
        at
org.apache.camel.component.mina2.Mina2Producer.process(Mina2Producer.java:116)
        ...
        ...
        ...
2017-02-24 11:09:26,991] [INFO ] [Camel (camelContext-theApplication) thread
#0 - JmsConsumer[theQueue]] 
[org.apache.camel.processor.DefaultErrorHandler] Failed delivery for
(MessageId: ID:theRecieverHost-42190-1487661125797-23:1:-1:1:208 on 
ExchangeId: ID-the-Host-34071-1487843214861-0-829). Exhausted after delivery
attempt: 1 caught: 
country.firm.integration.ik.common.error.RollbackException: Original
exception:java.io.IOException, 
message:Cannot write body: byte[] using session: (0x000001A0: nio socket,
client, 0.0.0.0/0.0.0.0:53340 => null). 
Exchange[ID-the-Host-34071-1487843214861-0-829]. Processed by failure
processor: 
FatalFallbackErrorHandler[Pipeline[[Channel[DelegateSync[RollbackExceptionProcessor]],
Channel[DelegateSync[FinallyProcessor]]]]]

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                             
                                          
Elapsed (ms)
[SenderApp         ] [SenderApp         ]
[mq://queue:theQueue?disableReplyTo=true                                      
] [     10236]
[SenderApp         ] [setHeader4        ] [setHeader[incomingEndpointName]      
                                        
] [         0]
[SenderApp         ] [to17              ] [direct:handleIncomingEndpoint        
                                        
] [     10236]
[direct:handleIncom] [to15              ]
[direct:setupIncomingEndpointHeadersAndProperties                             
] [         1]
[direct:setupIncomi] [doTry5            ] [doTry                                
                                        
] [         1]
[direct:setupIncomi] [DispatcherBean.set]
[bean[country.firm.integration.route.bean.DispatcherBean@1eff0ddc]            
] [         0]
[direct:handleIncom] [doTry17           ] [doTry                                
                                        
] [     10235]
[direct:handleIncom] [ik-common-route-in] [Processor@0x5595e0d0                 
                                        
] [         0]
[direct:handleIncom] [to16              ] [direct:sendMessageTransacted         
                                        
] [     10235]
[direct:sendMessage] [transacted1       ]
[transacted[ref:PROPAGATION_REQUIRES_NEW]                                     
] [     10235]
[direct:sendMessage] [to5               ] [direct:sendMessageNonTransacted      
                                        
] [     10235]
[direct:sendMessage] [to6               ] [direct:sleepAfterRollback            
                                        
] [         0]
[direct:sleepAfterR] [doTry9            ] [doTry                                
                                        
] [         0]
[direct:sleepAfterR] [SleepAfterRollback] [Processor@0x51356a68                 
                                        
] [         0]
[direct:sendMessage] [choice1           ]
[when[{exchangeProperty{exchangeProperty(postProcessCamelFromEndPoint)} is
not ] [         0]
[direct:sendMessage] [doTry14           ] [doTry                                
                                        
] [     10131]
[direct:sendMessage] [to8               ] [direct:sendMessage                   
                                        
] [     10131]
[direct:sendMessage] [doTry12           ] [doTry                                
                                        
] [     10131]
[direct:sendMessage] [DispatcherBean.sen]
[bean[country.firm.integration.route.bean.DispatcherBean@1eff0ddc]            
] [     10080]
[direct:sendMessage] [to4               ] [direct:sendError                     
                                        
] [        20]
[direct:sendError  ] [doTry10           ] [doTry                                
                                        
] [        20]
[direct:sendError  ] [DispatcherBean.sen]
[bean[country.firm.integration.route.bean.DispatcherBean@1eff0ddc]            
] [        20]
[direct:sendMessage] [ik-common-route-ch] [Processor@0x27c62e76                 
                                        
] [         7]
[direct:sendMessage] [ik-common-route-ch] [Processor@0x27c62e76                 
                                        
] [         0]
[                  ] [ik-common-route--O] [Processor@0x413156bf                 
                                        
] [        96]
[                  ] [ik-common-route--O] [Processor@0x3bd8ad29                 
                                        
] [         0]








--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to