Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is JMSType used for?

Tags:

jms

What is JMSType used for? Can it be used to define the message payload? For example, the payload might be for adding a product and the JMSType could be AddProduct.

like image 821
zachariahyoung Avatar asked Aug 30 '14 02:08

zachariahyoung


People also ask

What is JMSType?

JMSType is an optional header set by the JMS client. Its name is somewhat misleading because it has nothing to do with the type of message being sent ( BytesMessage , MapMessage , etc.). Its main purpose is to identify the message structure and type of payload; it is only supported by a couple of vendors.

What is JMS and why it is used?

The Java Message Service (JMS) was designed to make it easy to develop business applications that asynchronously send and receive business data and events. It defines a common enterprise messaging API that is designed to be easily and efficiently supported by a wide range of enterprise messaging products.

What is JMS message format?

JMS messages have a basic format that is simple but highly flexible, allowing you to create messages that match formats used by non-JMS applications on heterogeneous platforms. A JMS message has three parts: a header, properties, and a body. Only the header is required.

What is JMS type?

JMS defines six message interface types; a base message type and five subtypes. The message types are defined according to the type of the message payload , where the payload is the body of a message that holds the content. JMS specifies only the interface and does not specify the implementation.


1 Answers

JMS Specification says "The JMSType header field contains a message type identifier supplied by a client when a message is sent. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The type header field may reference a message’s definition in the provider’s repository. JMS does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains."

In effect, you can set JMSType to a value of your choice but it is suggested you make sure every application that runs on your JMS provider use the same values for JMSType.

like image 199
Shashi Avatar answered Dec 02 '22 11:12

Shashi