Can I ask why you don't want the message being redelivered in case of failure?
Suppose that a producer sends a consumer a money transfer order message. That message is propogated from HornetQ to the consumer which does receive it but the ack is not received to HornetQ, which will cause a the latter to re-send the money transfer order. In such a scenario (without message duplication prevention mechanism) the consumer will process the money transfer order twice instead of once.
I hope that I was able to make it clear enough.
1 of 1 people found this helpful
I think what you need is transactional receive. You can wrap the message receiving and money transfer in one transaction. If the ack failed the transaction will be rolled back.
I appreciate your help.