Name
Point-to-Point Distribution Pattern
Goal
Send a message once and only once to a destination known to the sender.
Participants
- Sender
Originates a message and is aware of the destination.
- Recipient
Receives a message.
- Messaging server
Relays a message from a sender to a recipient.
Interactions
The sender dispatches a message to a messaging server, which is responsible for relaying the message to a particular recipient. The messaging server may proactively deliver the message (by contacting the recipient directly), or hold the message until the recipient connects to retrieve it.
Notes
In a JMS environment using an enterprise message queue product,
point-to-point messaging is implemented via the
Queue
interface. In an SMTP environment with
JavaMail, all messaging is point-to-point.
Get J2EE Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.