Message Properties

The following JMS properties that can be set on a JMS message:

Dead Message Queue Eligible

This property specifies whether sent messages are eligible for a Dead Message Queue (DMQ). For more information, refer to Dead Message Queue Eligibility.

  • Type: Boolean
  • Format: Valid values are [true|false]. By default, this property is set to false.

Dead Message Queue Eligible Property

Property Source (listed in descending priority)

Example

Message

This sets the delivery mode for each sent message.

Message.setBooleanProperty(SupportedProperty.SOLACE_JMS_PROP_DEAD_MSG_QUEUE_ELIGIBLE, true)

JNDI Connection Factory

SolAdmin—Set through the Default DMQ Eligible box in the Messaging Properties tab of the New JMS Connection Factory or Edit JMS Connection Factory dialog box.

CLI/SEMP—Set through Property List “messaging‑properties”, Property “default‑dmq‑eligible”.

Delivery Mode

This property specifies the delivery mode for sent messages.

  • Type: Enum
  • Format: [DeliveryMode.NON_PERSISTENT | DeliveryMode.PERSISTENT]
  • Default: persistent

Delivery Mode Property

Property Source (listed in descending priority)

Example

JMS API

This sets the delivery mode for each sent message.

MessageProducer.send(myTopic, message, DeliveryMode.NON_PERSISTENT, 0, 30000)

JMS API

This sets the default delivery mode for the Producer.

MessageProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT)

JNDI Connection Factory

SolAdmin—Set through the Default Delivery Mode box in the Messaging Properties tab of the New JMS Connection Factory or Edit JMS Connection Factory dialog box.

CLI/SEMP—Set through Property List “messaging‑properties”, Property “default‑delivery‑mode”.

Deliver-To-One

This property specifies whether sent messages are DTO.

  • Type: Boolean
  • Format: [true|false]
  • Default: false

Deliver-To-One Property

Property Source (listed in descending priority)

Example

Message

Message.setBooleanProperty(SupportedProperty.SOLACE_JMS_PROP_DELIVER_TO_ONE, true)

JNDI Connection Factory

SolAdmin—Set through the Deliver to One box in the Messaging Properties tab of the New JMS Connection Factory or Edit JMS Connection Factory dialog box.

CLI/SEMP—Set through Property List “deliver‑to‑on‑properties”, Property “deliver‑to‑one”.

Discard Indication

This property specifies whether a Non-Persistent message published using Direct Transport has been discarded prior to the current received message. This is a read‑only property.

Note:  Messages received by durable consumers or non-durable consumers that use Guaranteed Transport - that is, direct-transport is not enabled - won't have the discard indication property.

For more information, refer to Message Discard Notification.

  • Type: Boolean
  • Format: [true|false]
  • Default: false

Discard Indication Property

Property Source

Example

Message

Message.getBooleanProperty(SupportedProperty.SOLACE_JMS_PROP_MSG_DISCARD_INDICATION)

Eliding Eligible

This property specifies whether sent messages are marked as eligible for eliding. For more information, refer to Eliding Eligibility.

  • Type: Boolean
  • Format: [true|false]
  • Default: false

Eliding Eligible Property

Property Source (listed in descending priority)

Example

Message

Message.setBooleanProperty(SupportedProperty.SOLACE_JMS_PROP_ELIDING_ELIGIBLE, true)

JNDI Connection Factory

SolAdmin—Set through the Default Eliding Eligible box in the Messaging Properties tab of the New JMS Connection Factory or Edit JMS Connection Factory dialog box.

CLI/SEMP—Set through Property List “messaging‑properties”, Property “default‑eliding‑eligible”.

HTTP Content Encoding

This property specifies the HTTP content encoding header value for interaction with an HTTP client.

  • Supported by: Solace PubSub+ 7.1 and higher
  • Type: String
  • Format: Must be a maximum of 252 ASCII characters.
  • Default: null

HTTP Content Encoding Property

Property Source

Example

Message

Message.setStringProperty(SupportedProperty.SOLACE_JMS_PROP_HTTP_CONTENT_ENCODING, “gzip”)

HTTP Content Type

This property specifies the HTTP content type header value for interaction with an HTTP client.

  • Supported by: Solace PubSub+ 7.1 and higher
  • Type: String
  • Format: Must be a maximum of 252 ASCII characters.
  • Default: null

HTTP Content Type Property

Property Source

Example

Message

Message.setStringProperty(SupportedProperty.SOLACE_JMS_PROP_HTTP_CONTENT_TYPE, “application/json”)

Reply Message

This property specifies whether the messages is a reply to a request message that uses Direct Transport delivery mode.

For more information, refer to Eliding Eligibility.

  • Supported by: Solace PubSub+ 6.1 and higher
  • Type: Boolean
  • Format: [true|false]
  • Default: false

Reply Message Property

Property Source

Example

Message

Message.setBooleanProperty (SupportedProperty.SOLACE_JMS_PROP_IS_REPLY_MESSAGE, true)

Tags the Direct message as a reply to a Direct Transport request. To be set by the replier.

Message.getBooleanProperty (SupportedProperty.SOLACE_JMS_PROP_IS_REPLY_MESSAGE, true)

Tests whether this message is a reply to a Direct Transport request.

Topic Sequence Number

This property specifies that the message broker should assign a topic sequence number to messages that are delivered to durable consumers or non-durable consumers using Guaranteed Transport (that is, Direct Transport is not enabled). This is a read‑only property.

Notice  

This property is deprecated and should not be used.

  • Type: Long
  • Format: Valid values are 1 through 9,223,372,036,854,775,807
  • Default: null (that is, no sequence numbering).

Topic Sequence Number Property

Property Source

Example

Message

A topic sequence number is automatically assigned by the message broker.

A receiving client using a durable consumer can use Message.getLongProperty(SupportedProperty.SOLACE_JMS_PROP_TOPIC_SEQUENCE_NUMBER)to get a message’s topic sequence.

XML Payload

This property controls whether messages published as JMS TextMessages will have their TextMessage strings placed in the messages' XML payload (property is set to true) or in binary attachments (property is set to false).

For more information, refer to Delivering Messages to Single Consumers.

  • Type: Boolean
  • Format: [true|false]
  • Default: false

XML Payload Property

Property Source (listed in descending priority)

Example

Message

Message.setBooleanProperty(SupportedProperty.SOLACE_JMS_PROP_ISXML, true)

JNDI Connection Factory

SolAdmin—Set through the Text Messages are XML box in the Messaging Properties tab of the New JMS Connection Factory or Edit JMS Connection Factory dialog box.

CLI/SEMP—Set through Property List “messaging‑properties”, Property “text‑msg‑xml‑payload”.