message.putHeader
message.message.putHeader(key, value)
message.getMessage().putHeader(key, value)
Description
Sets the key in the header to the value.
Parameters
| Parameter | Type | Explanation |
|---|---|---|
| key | String | Field name (use a / between field names when the field is in another field) |
| value | Object | The value to set the field to |
Example
message.message.putHeader("metadata/message_type", " messageType")