Please update glassfish documentation for the enhancement of GLASSFISH-6617:
A new MQ 5.0 property "imq.transaction.message.maxConsecutiveRollbacks" was added.
For the EMBEDDED/LOCAL jms service of glassfish, the property can be set via admin gui:
Configurations -> server-config -> Java Message Service -> Additional Properties
For the REMOTE jms service of glassfish, the property should be set in the remote broker's config properties file.
If <= 0, this feature is disabled;
If > 0, for running in GlassFish with JMSRA, when consecutive rollback a message to a consumer exceeds this number, the broker will automatically put this message to DMQ (if there are more than 1 message in the transaction, only the last message in the transaction is put to DMQ) and and rollback the rest of the transaction then return an error status to rollback