JMS Domain-JMS 消息传递方式
博客专区 > Oscarfff 的博客 > 博客详情
JMS Domain-JMS 消息传递方式
Oscarfff 发表于1年前
JMS Domain-JMS 消息传递方式
  • 发表于 1年前
  • 阅读 8
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 新注册用户 域名抢购1元起>>>   

THE POINT-TO-POINT DOMAIN
        The point-to-point (PTP) messaging domain uses destinations known as queues.
Through the use of queues, messages are sent and received either synchronously or
asynchronously. Each message received on the queue is delivered once and only
once to a single consumer. This is similar to a person-to-person email sent through a
mail server. Consumers receive messages from the queue either synchronously using
the MessageConsumer.receive() method or asynchronously by registering a
MessageListener implementation using the MessageConsumer.setMessage-
Listener() method. The queue stores all messages until they’re delivered or until
they expire.
        Multiple consumers can be registered on a single queue as shown in figure 2.6, but
only one consumer will receive a given message and then it’s up to that consumer to
acknowledge the message. Note that the message in figure 2.6 is sent from a single
producer and is delivered to a single consumer, not all consumers. As mentioned earlier,
the JMS provider guarantees the delivery of a message once and only once to the
next available registered consumer.
In this regard, the JMS provider is distributing the
messages in a sort of round-robin style across all the registered consumers.

PTP 这种消息分配模式是:每次JMS provider 会把一个消息 发给一个Consumer 不会同时发送给两个Consumer.

摘自:《ActionMQ in Action》

标签: JMS Domain message
共有 人打赏支持
粉丝 71
博文 800
码字总数 96847
×
Oscarfff
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: