EMS : The Session was closed due to an unrecoverable error

369 Views Asked by At

I'm using SAP event mesh(EMS) for communication between events and sap JMS library(com.sap.cloud.servicesdk.xbem) for listening to messages from queue. But recently I have encountered exception while doing any operation and the exception is

javax.jms.IllegalStateException : The Session was closed due to an unrecoverable error

One example is while calling session.createQueue(queueName). After 1-2 days of inactivity the system goes to idle state and our application is no more able to listen to the EMS queues and because of that the data remain in the queue. It started working as expected after a fresh start. I did some analysis on the issue and found this workaround to set spring.jms.servicebus.idle-timeout property. But it usually decreases the usability of the JMS starter. So, Can anyone please suggest some other solution to resolve this error?

1

There are 1 best solutions below

0
NEHA On

I have tried upgrading my library and then added some reconnection logic in case of any exceptions as mentioned in the link and it is working fine now.