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
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》