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