Explained below are the message types and message headers that are supported by WSO2 Message Broker (WSO2 MB). Find more information on how to use message selectors from here.
Note that message selectors are not supported in a clustered setup of WSO2 Message Broker (WSO2 MB).
JMS Message Types supported by WSO2 MB
WSO2 MB supports all five types of JMS messages named TextMessage, BytesMessage, MapMessage, ObjectMessage and StreamMessage. A JMS client can send or receive any type of message from the above five and the content of the messages can be viewed using the WSO2 MB Queue Browser window. However, viewing the message body of an 'ObjectMessage' using the queue browser is not supported.
JMS Message Headers supported by WSO2 MB
A JMS client can create a message and set various fields of the message header before it is sent to a queue in WSO2 MB. However, as supported by the JMS specification, there are several message header fields which cannot be explicitly set by a JMS client. Hence even though client sets these fields, those will be replaced at the JMS provider level once it is received by WSO2 MB.
The following table displays a list of JMS message headers and in which level they can be configured.
|JMS Message Header||Can be Set by Whom|
|JMSDestination||JMS providers can set this field when a message is sent. However, this header should also be set at broker level in WSO2 MB, because the client level header will be ignored by the broker.|
|JMSDeliveryMode||As WSO2 MB uses persistent storage in Standalone mode, the DeliveryMode will be set to '1' by default. It is not possible to change this at client level.|
|JMSExpiration||This header is not supported in WSO2 MB. The value passed by the producer/publisher will be delivered to the client without changing the value.|
|JMSPriority||This header is not supported in WSO2 MB. Even if the JMS provider sets a priority, the broker will ignore this header and messages will be delivered in the order that they were sent to the broker.|
|JMSMessageID||JMS providers can set this field when a message is sent. However, this header should also be set at broker level in WSO2 MB, because the client level header will be ignored by the broker.|
|JMSTimestamp||The value passed by the producer/publisher will be delivered to the client without changing the value.|
|JMSCorrelationID||By using a JMS Client|
|JMSReplyTo||By using a JMS Client|
|JMSType||By using a JMS Client|
|JMSRedelivered||From the JMS provider only|