观澜Media

AI技术 · 深度资讯 · 前沿观察

JMS, ActiveMQ 学习一则 – daidaidaiyu

JMS, ActiveMQ 学习一则 &#8211..

JMS, ActiveMQ 学习一则 – daidaidaiyu – 博客园 dddy 博客园 首页 新随笔 联系 订阅 –> 管理 JMS, ActiveMQ 学习一则 2020-05-21 JMS标准 JMS(Java Messaging Service)是Java平台上有关面向消息中间件(MOM)的技术规范, 它便于消息系统中的Java应用程序进行消息交换,并且通过提供标准的产生, 发送, 接收消息的接口简化企业应用的开发, 翻译为Java消息服务; ORACLE 官方介绍页面 消息传递模型 (Message Delivery Models) JMS supports two different message delivery(投送) models: Point-to-Point (Queue destination): In this model, a message is delivered from a producer to one consumer。

The messages are delivered to the destination, which is a queue, and then delivered to one of the consumers registered for the queue。

While any number of producers can send messages to the queue, each message is guaranteed to be delivered, and consumed by one consumer。

If no consumers are registered to consume the messages, the queue holds them until a consumer registers to consume them。

简而言之, 点对点,保证每条消息只有一个消费者消费;接收者在成功接收消息之后需向队列应答成功, 如果没有注册消费者的消息,将在队列保存; 如果希望发送的每个消息都应该被成功处理的话, 那么选择P2P模型 Publish/Subscribe (Topic destination): In this model, a message is delivered from a producer to any number of consumers。

If there are no consumers registered, the topic destination doesn’t hold messages unless it has durable subscription for inactive consumers。

来源:博客园

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关于我们

观澜Media

AI技术 · 深度资讯 · 前沿观察。专注科技、AI、互联网领域的深度报道与前沿资讯。

搜索归档

Access over the years of investigative journalism and breaking reports