Dear All, 

 

      We have developed one server using Apache MINA V2.0.9 where multiple
vendors connect and send the messages which needs to be processed and then
response have to be sent back to vendor. Currently we have put a strategy
that vendor has to send one message per connection and after getting
response or timeout vendor has to close the connection.
      
      We also have persistence connection open from our MINA based server
with third party server which is tcp/ip channel and for each vendor request
we get we have to send the received message to this third party server. Past
3-4 days we have observed that some of the received vendor messages when we
try to send on the third party server over persistence connection they are
actually not sent even after calling iosession.write(object message) method.
This operation is asynchronous; IoHandler.messageSent(IoSession, Object)
will be invoked when the message is actually sent to remote peer. When we
checked the netstat for that remote peer we could not see that connection
entry, but at MINA level we never receive the ConnectionClose event so that
we can reestablish the connection. Also the session.write API also does not
throw any error and keep adding the messages in the queue. We need to
restart our server to overcome the issue when such situation arises.

. 

How to identify session is not valid or disconnected.

 

I have gone through the following article. My question is why the
session.write does not through the error and just adding it in the queue to
send on session which is invalid so that handling that error we can
reconnect.

 

https://stackoverflow.com/questions/39517015/apache-mina-how-to-detect-when-
youre-sending-messages-using-an-invalid-socket

 

Thanks in advance. 

 

Thanks And Regards,
Nitin Phuria

 


-- 
*Confidentiality Disclaimer**: "The information contained in this 
electronic message (email) and any attachments to this email are intended 
for the exclusive use of the addressee(s) and access to this email by 
anyone else is unauthorized. The email may contain proprietary, 
confidential or privileged information or information relating to Integra 
Group. If you are not the intended recipient, please notify the sender by 
telephone, fax, or return email and delete this communication and any 
attachments thereto, immediately from your computer. Any dissemination, 
distribution, or copying of this communication and the attachments thereto 
(in whole or part), in any manner, is strictly prohibited and actionable at 
law. The recipient acknowledges that emails are susceptible to alteration 
and their integrity cannot be guaranteed and that Company does not 
guarantee that any e-mail is virus-free and accept no liability for any 
damage caused by any virus transmitted by this email."*

Reply via email to