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

移动开发云端新模式探索实践 >>>   

        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
博文 804
码字总数 96913
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
* 支付类型