We are using spring-jms to receive message off the queue. But sometimes we got a connection issue (downstream JDBC on the listener thread) where we don't have enough connection in the pool. So we want to retry that message again and if we still dont have connection then we will reject the message
We are trying this in error handler and that error handler instance is inject to spring default message listener container but I am not sure how to access the message object as it only provides Throwable object.
Does anyone know how to access actual message object?