[ Team LiB ] |
C.1 Message Distribution Patterns
GoalProvide a procedure to handle messages that can be successfully delivered but cannot be properly processed due to invalid or corrupted message data. Participants
InteractionsThe messaging server delivers messages to a client. If the client cannot properly process the message, it routes a copy to a special messaging destination configured within the messaging server. A human can monitor this malformed message channel and delete or act upon the messages it contains. NotesIn JMS, use a specially designated Queue or a Topic in your messaging server as a malformed message channel. You use your message server's tools to periodically examine the channel to identify unprocessed messages. The incidence of malformed messages will probably be higher when using SMTP for messaging.
GoalSend a message once and only once to a destination known to the sender. Participants
InteractionsThe 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. NotesIn 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.
GoalSend a single copy of a message for delivery to multiple recipients who may or may not be individually known to the sender. Participants
InteractionsRather than identify a particular recipient, the sender identifies a message as being of a certain type. Recipients may then register with the messaging server as being interested in receiving all messages of a particular type. When a sender creates a new message, all recipients who have expressed interest in receiving messages of that type will receive a copy. NotesIn a JMS environment, publish-subscribe is implemented via the Topic interface. In an SMTP/JavaMail environment, implementing publish-subscribe requires additional infrastructure, either within your application or within your mail server. |
[ Team LiB ] |