Optional
correlationSets the correlation ID which is carried in the message headers unmodified.
A correlation ID is a unique identifier value that is attached to a message that allows referencing to a particular transaction or event chain.
If replying to a request via SolaceMessageClient#reply, the API will copy the correlation id from the request, thus must not be set manually.
Optional
correlationSets the correlation key to correlate events from the Solace event broker when sending the message to the broker.
The correlation key is an object that is passed back to the client during the router acknowledgement or rejection. Note that the correlation key is not included in the transmitted message and is only used with the local API.
Optional
deliverySets the delivery mode of the message.
Solace supports two delivery modes, also known as qualities of service (QoS):
For a detailed comparison, refer to https://solace.com/blog/delivery-modes-direct-messaging-vs-persistent-messaging.
Direct messaging is over TCP and provides a reliable, but not guaranteed, delivery of messages from the Solace event broker to consuming clients, and is the default message delivery system. The broker delivers a message one time at most. It is most appropriate for messaging applications that require very high-rate or very low-latency message transmission, i.e., to efficiently publish messages to a large number of clients with matching subscriptions.
For more information, refer to https://docs.solace.com/PubSub-Basics/Direct-Messages.htm.
Persistent messaging is also over TCP but has an additional set of acknowledgments beyond those used by TCP itself. Solace event broker guarantees the message never to be lost and to be delivered at least once. Use persistent messaging when data must be received by the consuming application.
Persistent messaging occurs between the publishing application and the broker, and between the broker and the consuming application. If the consuming application is not connected or cannot keep up with the publishing application, the messages are stored in endpoints on the broker.
For more information, refer to https://docs.solace.com/PubSub-Basics/Guaranteed-Messages.htm or https://docs.solace.com/PubSub-Basics/Basic-Guaranteed-Messsaging-Operation.htm.
If you experience poor performance when sending guaranteed messages, consider adjusting the size of the publishing window via Session#publisherProperties#windowSize, as described here: https://solace.com/blog/understanding-guaranteed-message-publish-window-sizes-and-acknowledgement
Optional
dmqSpecifies if to publish a Guaranteed Message DMQ (Dead Message Queue) eligible message. When this property is set, when the message expires in the network, the message is saved on a appliance dead message queue. Otherwise the expired message is discarded. See PublishOptions.setTimeToLive.
Optional
headersConvenience API for setting headers to pass additional information along with the message.
Headers are transported as structured data separate from the payload. To pass a header value
different to string
, boolean
or number
, pass it as Structured Data Type (SDT) in the
form of a SDTField, as following: SDTField.create(SDTFieldType.INT8, 2);
Header values are mapped as following to structured data types:
string
-> SDTFieldType.STRING
boolean
-> SDTFieldType.BOOL
number
-> SDTFieldType.INT32
Optional
interceptAllows intercepting the raw message before it is sent over the network.
Only basic properties can be set via PublishOptions. To set other properties or properties not yet supported by the API, the message can be intercepted and the properties set accordingly.
Optional
markMarks this message as a reply to a previous request in "request-response" communication.
If replying to a request via SolaceMessageClient#reply, the API will mark the message as a reply, thus must not be set manually.
Optional
prioritySpecifies the message priority (JMS Priority) for the message. Numerical values between 0 and 255 are accepted, use undefined to unset.
If destination queues and topic endpoints for this message are configured to respect message priority, the values 0 through 9 can be used to affect the priority of delivery to consumers of those queues or topic endpoints. For the purposes of prioritized message delivery, values larger than 9 are treated the same as 9.
Optional
replySets the destination a replier can reply to in "request-response" communication.
If not passed the API will generate a 'replyTo' destination where to send the reply to.
Optional
requestSpecifies the maximum time (in milliseconds) to wait for a response to be received. The minimum value is 100ms. If specified, overrides the global timeout as set via SessionProperties#readTimeoutInMsecs.
Optional
timeSpecifies the guaranteed message TTL, in milliseconds.
The time to live is the number of milliseconds the message may be stored on the Solace Message Router before the message is discarded or moved to a Dead Message Queue. See Message.setDMQEligible.
Setting the Time To Live to zero disables TTL for the message.
This property is only valid for Guaranteed messages (Persistent and Non-Persistent). It has no effect when used in conjunction with other message types unless the message is promoted by the appliance to a Guaranteed message.
The maxium allowed time to live is 3.1536E11 (315360000000) which is approximately 10 years.
Control how to publish a request.