JMS Message Type

Source: Internet
Author: User

The JMS API defines five types of message bodies:


--------------------------------------------------------------------------------------------------------------- ----
Stream-The message body of the Streammessage object contains the Java programming language primitive value stream ("Java basic type"). Populate and read sequentially.

Map-The message body of the Mapmessage object contains a set of name-value pairs, where the name is a String object and the value is the Java base type. These entries can be accessed sequentially or randomly by name. The order of the entries is indeterminate.

Text-The message body of the TextMessage object contains the Java.lang.String object. This message type can be used to transport plain text messages and XML messages.

Object-The message body of the ObjectMessage object contains the Serializable Java object.

Byte (bytes)-The message body of the Bytesmessage object contains an unexplained stream of bytes. This message type can literally encode the body to match the existing message format. In most cases, you can use other body types that are easier to use. Although the JMS API allows message properties to be used for byte messages, they are generally not used because the containing attribute may affect the format.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.