Message queue comparison
Sign for the message
There are three types of non-transactional receipts
1) Automatically sign for Session.AUTO_ACKNOWLEDGE
2) Manually sign for Session.CLIENT_ACKNOWLEDGE
3) Allow repeated messages Session.DUPS_OK_ACKNOWLEDGE? ? ? I did not verify this.
For the producer, if the transaction is opened, the sign-off mechanism can be chosen at will. The priority of the transaction is higher than the sign-off mechanism.
Verification 1: The producer does not open the transaction and sends the message to the server by means of automatic sign-off.
Consumers use manual signing and find that the message can be re-consumed.
The message is sent to the server, the consumer program is run, and the message is not consumed
After the message signing mechanism is turned on, the message cannot be consumed repeatedly
Sign receipt in transaction mode
The producer opens the transaction, the sign-off mode is automatic sign-off, and the message is sent to the server
The consumer starts the transaction and uses the manual sign-off mode, but the message does not use the ack mechanism.
The message is still consumed
Verification: The
producer opens the transaction, the sign-off mode is automatic sign, and sends the message to the server; the
consumer opens the transaction, uses the manual sign-off mode, and the message uses the ack mechanism. But there is no commit. Messages can be repeatedly consumed
Conclusion:
In a transactional session, when a transaction is successfully submitted, the message is automatically signed. If the transaction rolls back, the message will be sent again.
In a non-transactional conversation, when the message is confirmed depends on the acknowledgement mode when the conversation is created (acknowledgement)