I am using Spring JMS to connect to a Websphere MQ server. I implemented the SessionAwareListener interface to create a custom listener, reusing old code for the business lo
You can always check the JMSDeliveryCount. If it is more than the number you consider as maximum then just don't process the message and return.
You can also configure your Websphere to move the bad message to the exception destination after some attempts.