简体   繁体   English

使用主题(发布和订阅),何时将邮件从主题中删除?

[英]Using a topic (publish and subscribe), when will the message be removed from the topic?

Say there is a topic many MQ clients are connected to in order to receive messages. 假设有一个主题,许多MQ客户端已连接到该主题以接收消息。

My question is when will the MQ server remove the message from the topic? 我的问题是MQ服务器何时将消息从主题中删除?

There are two points here: 这里有两点:

First: MQ queue manager will deliver publications to all subscribers registered for that topic. 首先:MQ队列管理器将发布发布到为此主题注册的所有订阅者。 If a subscription is non-durable, then the publication is delivered only if the subscriber is active. 如果订阅是非持久的,则仅在订阅者处于活动状态时才发布发布。 If a subscription is durable, then the publication will be put into the destination (basically a queue) specified by the subscription. 如果订阅是持久的,则发布将被放入订阅指定的目的地(基本上是队列)。 If the durable subscriber is active, the publication may be picked up immediately else it may be picked up later. 如果长期订阅者处于活动状态,则可以立即选择发布,否则可以稍后选择。 Once the queue manager delivers the publication to all registered subscribers, the publication is discarded. 一旦队列管理器将发布传递给所有注册的订户,该发布将被丢弃。

Second: Queue manager will retain a copy of the publication if the publisher tells it to do so. 第二:如果发布者指示,队列管理器将retain的副本。 In this case the publication is retained by queue manager until a publisher publishes another publication on the same topic and tells again to retain the publication. 在这种情况下,出版物将由队列管理器保留,直到发布者针对同一主题发布另一个出版物,然后再次告知要保留该出版物。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM