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 3. Anatomy of a JMS Message

This chapter focuses on the anatomy of a message: the individual parts that make up a message (headers, properties, and the different kinds of message payloads). Appendixes B and C cover additional information that will prove invaluable as a reference when developing JMS applications. Appendix B provides in-depth information on the purpose and application of JMS headers, and Appendix C covers the rules governing the use of JMS properties. Although you do not need to read these appendixes to understand subsequent chapters in this book, you will need them as a reference when implementing real JMS applications. After you finish reading this chapter, take a look at Appendixes B and C so you’re familiar with their content.

The Message is the most important part of the entire JMS specification. All data and events in a JMS application are communicated with messages, while the rest of JMS exists to facilitate the transfer of messages. Messages are the lifeblood of the system.

A JMS message carries application data and provides event notification. Its role is unique to distributed computing. In RPC-based systems (CORBA, Java RMI, DCOM), a message is a command to execute a method or procedure, which blocks the sender until a reply has been received. A JMS message is not a command; it transfers data and tells the receiver that something has happened. A message doesn’t dictate what the recipient should do and the sender doesn’t wait for a response. This decouples ...

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