本文介绍了AUTO_ACKNOWLEDGEMENT模式(非事务性)接收vs onMessage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题:
这是正确的吗,因为我无法在Java文档的任何地方找到相同的内容?

I have a question :
Is this correct, as I am not able to find the same anywhere in java docs ?

从此处 JavaWorld
在AUTO_ACKNOWLEDGEMENT模式下(非事务性)
如果在执行receive()[synchronous]方法或onMessage()[aysnc]方法时发生故障,该消息将自动重新发送

From here JavaWorld
In AUTO_ACKNOWLEDGEMENT mode(non-transactional)
If a failure occurs while executing the receive()[synchronous] method or the onMessage()[aysnc] method, the message is automatically redelivered

推荐答案

我认为,如果我们在onMessage中收到一条消息,则意味着该消息已成功传递给用户. JMS提供者必须确保没有消息丢失. onMessage只能等待下一个成功传递的消息,它不能知道JMS提供程序和JMS服务器之间的问题.

I think that if we got a message in onMessage it means the message is successfully delivered to the user. JMS provider must make sure that no messages are lost. onMessage can only wait for the next successfully delivered message, it cannot know about problems between JMS provider and JMS server.

这篇关于AUTO_ACKNOWLEDGEMENT模式(非事务性)接收vs onMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 16:27