Click or drag to resize

IMessageCreateUserPropertyMap Method

version: 10.21.0
Creates a user property map (of type IMapContainer) in the meta header of a message. Any existing user property map is overwritten. After adding user properties to this map, it must be closed; if not, it is automatically closed after the associated message is disposed IDisposable.

Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use this map results in an OperationErrorException with ParamNullReference

Namespace:  SolaceSystems.Solclient.Messaging
Assembly:  SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.21.0
IMapContainer CreateUserPropertyMap()

Return Value

Type: IMapContainer
The created user property map.
OperationErrorException Thrown when the method invocation fails. ReturnCode and ErrorInfo will be accessible from OperationErrorException
FatalErrorException Thrown when an unrecoverable error occurs.
Do not set UserPropertyMap to the result of this method. Doing so will cause the underlying structure to be disposed. Correctly accessing the property map:
IMessage msg = ContextFactory.Instance.CreateMessage();
msg.UserPropertyMap.AddString("message", "5");
See Also