IMessageUserPropertyMap Property

Returns the user property map from the message's meta header. If no user property map is present in the message, this property is null. To create a new user property map use CreateUserPropertyMap instead.

After adding properties to this map, it must be closed; if not, it is automatically closed after the associated message is sent, or 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 error subcode.

As a consequence to the above note, when caching the reference to this map (to avoid creating a new temporary object with each access), client applications should not use this reference after the associated message has been sent or disposed. At that point the cached user property map reference is invalid, and a new user map reference is required by calling IMessage.UserPropertyMap to access the user property map again.


Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.24.0
IMapContainer UserPropertyMap { get; set; }

Property Value



Do not set this value to the result of CreateUserPropertyMap. Doing so will cause the underlying structure to be disposed. Instead, access the map this way:
IMessage msg = ContextFactory.Instance.CreateMessage();
msg.UserPropertyMap.AddString("message", "5");

See Also