IMessage.CreateUserPropertyMap Method

Solclient

IMessageCreateUserPropertyMap Method
version: 7.2.1.27
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: 7.2.1.27 (7.2.1.27)
Syntax
IMapContainer CreateUserPropertyMap()
Function CreateUserPropertyMap As IMapContainer
IMapContainer^ CreateUserPropertyMap()

Return Value

Type: IMapContainer
The created user property map.
Exceptions
ExceptionCondition
OperationErrorException Thrown when the method invocation fails. ReturnCode and ErrorInfo will be accessible from OperationErrorException
FatalErrorException Thrown when an unrecoverable error occurs.
Remarks
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.CreateUserPropertyMap();
msg.UserPropertyMap.AddString("message", "5");
See Also