Creating Custom Message Header Fields

To create a custom message header field, you can create a map with custom user properties fields. The user properties are carried in the message separate from the payload.

PubSub+ Messaging API for C and .NET

When using the PubSub+ C API and PubSub+ .NET API, you can create a user property map for a message through a single function or method call. Each field in a user properties map is a SDT field. Once the map is created, data for fields in the map can be added with the PubSub+ C API and PubSub+ .NET API container functions and methods. For a comprehensive list of the available container methods and functions, see the following in the PubSub+ Messaging APIs documentation for the appropriate PubSub+ Messaging API.

PubSub+ Messaging API for JavaScript and Node.js

To create custom message header fields, first create an SDT map with custom user properties fields, then pass it to the setUserPropertyMap function.

Creating a User Properties Map

PubSub+ Messaging API Use

PubSub+ C API

solClient_msg_createUserPropertyMap(...) and pass in an existing SDT.

PubSub+ .NET API

IMessage.CreateUserPropertyMap()

PubSub+ JavaScript API and PubSub+ Node.js API

solace.Message.setUserPropertyMap(...) and pass in an existing SDT.