Chapter 7. Guaranteed Messaging and Transactions
Guaranteed messaging is more than just a mechanism for handling disconnected consumers. It is a crucial part of the messaging paradigm and is the key to understanding the design of a distributed messaging system. This chapter examines why guaranteed messaging works, including message acknowledgment protocols that are part of guaranteed messaging and how to use client acknowledgments in applications. This chapter will also cover the design patterns of JMS that enable you to build guaranteed messaging into applications, and discuss failure scenarios, the rules that apply to recovery, and how to deal with recovery semantics in a JMS application.
Guaranteed Messaging
Before we discuss the parts of guaranteed messaging, we need to review and define some new terms. A JMS client application uses the JMS API. Each JMS vendor provides an implementation of the JMS API on the client, which we call the client runtime. In addition to the client runtime, the JMS vendor also provides some kind of message “server” that implements the routing and delivery of messages. The client runtime and the message server are collectively referred to as the JMS provider. Regardless of the architecture used by a JMS provider, the logical parts of a JMS system are the same. The number of processes and their location on the network is unimportant for this discussion. (In Chapter 10, you will see that some providers use a multicast architecture in which there is no ...
Get Java Message Service, 2nd Edition 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.