JMS规范或各种实现是否支持消息的传递确认? [英] Do the JMS spec or the various implementations support delivery confirmation of messages?

查看:99
本文介绍了JMS规范或各种实现是否支持消息的传递确认?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说生产者向JMS主题新闻"发送了一条消息. Consumer1读取了该消息,但Consumer2处于脱机状态,因此他尚未读取该消息.

Lets say Producer sends a message to the JMS Topic "news". Consumer1 reads the message, but Consumer2 is offline so he hasn't read the message yet.

是否可以通过任何内置方式(规范或隐含方式)通知生产者Consumer1已阅读他的消息,而Consumer2还没有?实际上,这将反映电子邮件的读取通知".

Is there any build-in (to the spec or impl) way for the Producer to be notified that Consumer1 has read his message, but Consumer2 has not? This would, in fact, mirror the Read Notification of an email.

很显然,您可以通过让每个使用者发送一个确认来实现这一点,但是我正在寻找已经是JMS或JMS系统一部分的东西.

Clearly you could implement this by having each Consumer send an acknowledgement, but I'm looking for something already a part of JMS or a JMS system.

推荐答案

JMS常见问题解答

JMS API消息传递提供有保证的 通过一次唯一的交付 PERSISTENT的交付语义 消息.另外,留言 消费者可以确保可靠 通过使用以下任一方法来处理消息 CLIENT_ACKNOWLEDGE模式或已处理 会议.这实现了可靠 以最小的同步交付 是企业消息传递模型 大多数供应商和开发人员都喜欢.

JMS API messaging provides guaranteed delivery via the once-and-only-once delivery semantics of PERSISTENT messages. In addition, message consumers can insure reliable processing of messages by using either CLIENT_ACKNOWLEDGE mode or transacted sessions. This achieves reliable delivery with minimum synchronization and is the enterprise messaging model most vendors and developers prefer.

JMS API未定义架构 系统消息(例如传递) 通知).如果申请 需要确认消息 收据,它可以定义一个 应用层确认 消息.

The JMS API does not define a schema of systems messages (such as delivery notifications). If an application requires acknowledgment of message receipt, it can define an application-level acknowledgment message.

这些问题更清楚 了解他们在检查时 发布/订阅的上下文 应用程序.在这种情况下, 同步传送和/或系统 收据的确认不是 有效的执行机制 可靠的应用程序(因为 根据定义,生产者不是,并且 不想成为,负责 端到端消息传递).

These issues are more clearly understood when they are examined in the context of publish/subscribe applications. In this context, synchronous delivery and/or system acknowledgment of receipt are not an effective mechanism for implementing reliable applications (because producers by definition are not, and do not want to be, responsible for end-to-end message delivery).

我不是专家,但是我想这是说规范没有定义消费者通过设计向生产者确认收货的方式.我不知道有任何实现方式,如果实现了,看来将与规范捕获的模型有很大出入.

I'm no expert, but I think this is saying that the spec doesn't define a way for a consumer to confirm receipt to a producer, by design. I don't know of any implementations that do - and if they did, it looks like it'd be a big departure from the model the spec captures.

这篇关于JMS规范或各种实现是否支持消息的传递确认?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆