Summary

In this chapter we have covered JMS messages in detail. We began by detailing the design goals defined in the JMS specification. These goals allow JMS to capture as wide a range of enterprise messaging models as possible.

The bulk of the chapter, however, was devoted to the structure of JMS messages. We learned how every message is split into three parts: the header, the message properties, and the message body. Message headers contain a set of standard fields defined by the JMS specification. The values in the header fields are used for proper routing and processing of the messages. We also saw a sample application illustrating the use of different JMS header fields and how the different fields can be accessed and mutated.

Message properties are similar to message headers. However, unlike message headers, message properties are optional. We saw that message properties provide a way of adding application-specific header values to the messages and that they are also used by JMS clients to filter out the messages they receive using message selectors. The final example we looked at implemented message selectors and application-specific properties using a simple chat application.

JMS messages are categorized depending on the type of content that the messages can have in their body. Accordingly the JMS specification defines five different types of messages that cover most of the enterprise messaging requirements. We looked at an example that demonstrated each of these method types by selecting one at random and sending it to a queue. A message client was set up to consume these messages and process them dynamically.

In the next two chapters we will be covering the two messaging models in detail.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net