I am using JMS listener to process a response. When JMS couldn't acquire the lock on the case for which it tries to process the response, there should be alert email sent for me.
I have a service queue configured to run the service method of this JMS listener for a maximum of 500 times if it fails to process the response.
As the no. of attempts in case of failure is 500, we are getting 500 alerts if the case lock is held by others for the entire duration of JMS trying to process the response.
My requirement is to have an alert only if the response is not processed for the 500th time.
For that, I am using Queue current attempts and max attempts. By comparing the current and max attempts, I can trigger an alert.
Here, for the 1st attempt, the current attempts says 1 and max attempts says 500. But, when the JMS method is running for the 2nd attempt, the queue item ID is not seen in memory (clipboard) and thus, both current and max attempts values are returned as 0. Hence I cannot trigger an alert only when current attempts is equal to 500.
Can someone who are aware of this issue or have hands-on experience in JMS liseners can guide me please.