Book Image

WildFly Performance Tuning

Book Image

WildFly Performance Tuning

Overview of this book

Table of Contents (17 chapters)
WildFly Performance Tuning
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The message and its optimizations


In JMS, a message, javax.jms.Message, consists of a header, some properties, and a body. In the body, the actual payload of business data is located. As for most payloads, the less the data transferred, the less I/O will occur, which in turn infers increased throughput. Keeping a JMS message as small as possible puts less strain on both the network and the persistence layer of the JMS provider.

The following are the five types of messages available in JMS, each defining what the message body can contain:

  • javax.jms.TextMessage: It holds a Java string object.

  • javax.jms.ObjectMessage: It holds a serialized Java object.

  • javax.jms.MapMessage: It holds a message constructed by a set of key-value pairs. The keys are String objects, and the values are Java primitive data types.

  • javax.jms.StreamMessage: It holds a stream of Java primitive data types.

  • javax.jms.BytesMessage: It holds a message constructed by uninterpreted bytes.

Tip

For all JMS message types, the keep-it...