User-Configured Header Transforms
Generally, the consumed message’s headers are propagated through the connector to the output message. If you want to transform the headers, then you can do so as follows:
# <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 foo
& bar
, enter:
solace.connector.workflows.0.transform-headers.expressions.new_header="T(String).format('%s/abc/%s', headers.foo, headers.bar)"
Example 2: To remove the header, delete_me
, for workflow 0
, set the header transform expression to null
, enter:
solace.connector.workflows.0.transform-headers.expressions.delete_me="null"
For more information about Spring Expression Language (SpEL) expressions, see Spring Expression Language (SpEL).