Use Durable topic/queue
In addition to ensuring that subcribers of topics are durable, the quick answer is to ensure the handler of the message is enrolled in a Tx and rolls back on exception. JMS uses a data source, so you may want to ensure the data source is XA, as we do.
The question is what do you do when you have to roll back message handling due to a temporary problem (remote connectivity issue,) and you want to ensure continued message delivery until the external problem is corrected, similar to how SMTP engines usually handle bounces today. I'm working on a proposal for a workaround to issues that I'll post to get peer review here. I'd really love to know how others are solving this problem. If there is an easy solution, I'd sure like to know what it is before we implement a complex workaround.
For the 10,000 time.
The internal persistence transaction used by JBossMQ for JDBC has no relationship with
your application. It does not matter whether it is XA or Local.
How can I put this frequent misunderstanding to bed?
Please, if you don't know what you are talking about, don't mislead other users.
I do not want "the blind leading the blind".