JMS Domain-JMS 消息传递方式

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》

转载于:https://my.oschina.net/u/2308739/blog/731585

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值