O'Reilly logo

Java Message Service, 2nd Edition by Richard Monson-Haefel, Mark Richards, David A Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required