How to confirm a message in message driven beans

In the JMS document, I read that message driven beans do not support client_ Acknowledge mode, only supports dups_ OK_ Acknowledge and auto_ ACKNowLEDGE.

As far as I know, in auto_ In acknowledge mode, when the onmessage method is called, the message is acknowledged (deleted from the target) What I want is to tell my broker not to delete messages from the destination (queue or subject) in the event of an adverse event

There must be some way to do this In any case, why does message Drven beans not support client_ ACKNowLEDGE.

Solution

If you configure to use persistent messages, any exceptions in onmessage() will retain the message for redelivery based on the proxy and target settings If you are using non_ Persistent message, any exception in onmessage() will usually discard the message

Message driven beans are managed by J2EE container; Therefore, container handling confirmation In general, only a stand-alone JMS sink should use client_ ACKNowLEDGE.

What message oriented middleware do you use?

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>