In Chapter 3, “Messaging Systems,” we discussed Message Endpoint (95). This is how an application connects to a messaging system so that it can send and receive messages. As an application programmer, when you program to a messaging API such as JMS or the
System.Messaging namespace, you’re developing endpoint code. If you are using a commercial middleware package, most of this coding is already done for you through the libraries and tools provided by the vendor.
Some endpoint patterns apply to both senders and receivers. They concern how the application relates to the messaging system in general.
Encapsulate the messaging code—In general, an application should not be aware ...