Message Headers
This feature is deprecated and will be removed in a future release. Use the configuration described in Mapping Message Headers and Payloads instead.
Solace and JMS message headers can be created or manipulated using the User-Configured Header Transforms feature.
Solace Headers
Solace headers exposed to the Micro-Integration are documented in the Spring Cloud Stream Binder for Solace documentation.
JMS Message Headers
You can use the following JMS headers to get and set JMS message properties.
| Header Name | Type | Access | Description |
|---|---|---|---|
|
|
|
Read/Write |
The correlation ID for the message. |
|
|
|
Read |
The delivery mode value specified for this message. |
|
|
For version 2.0.0 and later: For versions earlier than 2.0.0: |
Read |
The destination to which the message is being sent. For versions 2.6.4 to 2.6.11, consumer bindings did not map
|
|
|
|
Read |
The time at which the JMS message is set to expire. |
|
|
|
Read |
A value that uniquely identifies each message sent by a provider. |
|
|
|
Read/Write |
Specifies the message’s priority set on the send. When header is absent, JMS message is sent with default priority of 4. |
|
|
|
Read |
An indication of whether this message is being redelivered. |
|
|
For version 2.0.0 and later: For versions earlier than 2.0.0: |
Read (Available only for versions 2.6.3 and earlier) Write (Available only for Outbound messages) |
The Destination object to which a reply to this message should be sent. For versions 2.6.4 and later, consumer bindings no longer map |
|
|
|
Read |
The time a message was handed off to a provider to be sent. |
|
|
|
Write |
Specifies the message’s time to live set on the send. When header is absent, JMS message is sent with default timeToLive of 0 (zero means that a message never expires). |
|
|
|
Read/Write |
The message type identifier supplied by the client when the message was sent. |
JMS Binder Headers
For Micro-Integration versions 2.0.0 and later, you can use the following header to get and set JMS Binder metadata.
| Header Name | Type | Access | Description |
|---|---|---|---|
|
|
|
Read |
Specifies when the JMS message payload is null. Two cases exist:
|
Reserved Message Headers
The following are reserved header spaces:
-
solace_ -
scst_ -
jms_|JMS_|JMSX -
Any headers defined by the core Spring messaging framework. For more information, see Spring Integration: Message Headers.
Headers with these prefixes may not be backwards compatible in future versions of this Micro-Integration, even if they are not currently defined by the Micro-Integration or any technology used by the Micro-Integration.
User Configured Header Transforms
Generally, the consumed message’s headers are propagated through the Micro-Integration to the output message. If you want to transform the headers, then you can do so using Spring Expression Language (SpEL) expressions:
# <workflow-id> : The workflow ID ([0-19]) # <header> : The key for the outbound header # <expression> : A SpEL expression which has "headers" as parameters solace.connector.workflows.<workflow-id>.transform-headers.expressions.<header>=<expression>
Example 1: To create a new header, new_header, for workflow 0 that is derived from the headers header1 and header2 (in this case, concatenating the header values with the string "abc"), use the following expression:
solace.connector.workflows.0.transform-headers.expressions.new_header="T(String).format('%s/abc/%s', headers.header1, headers.header2)"
Example 2: To remove the header delete_me for workflow 0, set the header transform expression to null:
solace.connector.workflows.0.transform-headers.expressions.delete_me="null"
For more information about SpEL expressions, see Spring Expression Language (SpEL).