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. This header should 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 setting a default value. |
JMSPriority | JMS providers can set this field when a message is sent. This header should be set at broker level in WSO2 MB, because the client level header will be ignored by the broker. |
JMSMessageID | JMS providers can set this field when a message is sent. This header should 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 setting a default 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 |