JMS Topic 和 JMS Queue 使用场景

20 篇文章 0 订阅

JMS Topic 和 JMS Queue 使用场景

Based on your desired subscription model, you must choose to implement either JMS Topic or JMS Queue. You should examine these use case descriptions described in this appendix to determine whether you should use JMSTOPIC or JMSQUEUE subscription in your implementation of the Transaction Server:

  • C.1 Use Case for JMS Topic
  • C.2 Use Case for JMS Queue

C.1 Use Case for JMS Topic

The use case for JMS Topic includes these considerations:
- A distribution mechanism for publishing messages that are delivered to multiple subscribers.
- Multiple consumers require delivery of the message.
- There is a timing dependency between publishers and subscribers. The publisher must create a subscription in order for clients to be able to subscribe. The subscriber must remain continuously active to receive messages, unless it has established a durable subscription. In that case, messages published while the subscriber is not connected will be redistributed whenever it reconnects.

C.2 Use Case for JMS Queue

The use case for JMS Queue includes these considerations:
- A staging area that contains messages that have been sent and are waiting to be read. As the name queue suggests, the messages are delivered in the order sent. A message is removed from the queue once it has been read.
- Point-to-point solution based on Publisher/ Subscriber model.
- Only one consumer will get the message.
- The producer does not have to be running at the time the consumer consumes the message, nor does the consumer need to be running at the time the message is sent.
- Every message successfully processed is acknowledged by the consumer.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值