withHeader
Adds a key-value pair to the message header and returns the message itself for method chaining.
Return
The message itself, allowing for method chaining.
Parameters
key
The key of the header.
value
The value of the header.
Adds all entries from the provided map to the message header and returns the message itself for method chaining.
Return
The message itself, allowing for method chaining.
Parameters
additionalSource
A map containing key-value pairs to be added to the header.