IMessage Properties

Solclient

IMessage Properties
version: 7.2.1.27

The IMessage type exposes the following members.

Properties
  Name Description
Public property AckImmediately
When the ACKImmediately property is set to true on an outgoing Guaranteed Delivery message, it indicates that the appliance should ACK this message immediately upon receipt.

This property, when set by a publisher, may or may not be removed by the appliance prior to delivery to a consumer, so message consumers must not rely on this property being present. Setting this property on an outgoing direct message or on a received message has no effect.

Default: false
Public property ADMessageId
Applies to received messages only with DeliveryMode MessageDeliveryMode.PERSISTENT or MessageDeliveryMode.NON_PERSISTENT. Represents the message Id of a Guaranteed message and can be used when acknowledging such a message. If not available 0 is returned.
Public property ApplicationMessageId
Gets/sets the application messageId. Returns null if not present.
Public property ApplicationMessageType
Gets/sets the application message type. This value is used by applications only and is passed through the API untouched. If not present, null is returned.
Public property BinaryAttachment
The binary attachment part of the message. If not present, null is returned to the user.
Public property CacheRequestId
Returns the request ID set in the cache request. Always null if CacheStatus is MessageCacheStatus.Live If not present -1 is returned
Public property CacheStatus
Returns the MessageCacheStatus.
Public property ConsumerIdList
Applies to received messages only. Returns the Conusmer Id list, null if the received message has none. Consumer IDs are only used with XML content subscriptions, not with topic subscriptions. When XML subscriptions are applied with consumer IDs, received messages contain a list of the consumer IDs of all XML subscriptions that were a match to that received message. This allows the application to know which of its XML subscriptions were a match to the received message. If not present, null is returned.
Public property CorrelationId
The correlation id is used for correlating a request to a reply. If not present, null is returned.
Public property CorrelationKey
Applies to Guaranteed messages (where DeliveryMode is Persistent or Non-persistent). When set on a message, the correlation key is returned in a message acknowledgment event. If not present, null is returned. CorrelationKey is local to the current application, it is not transmitted on the wire.
Public property DeliverToOne
A setter/getter for the Deliver-To-One (DTO) property on a message with a Delivery mode of Direct. When a message has the DTO property set, it can to be delivered only to one client. For a Guaranteed Delivery message (see DeliveryMode), this behavior only applies to the "demoted" direct copy of this message.

This property is only supported by appliances running SolOS-TR.

Public property DeliveryMode
A setter/getter for MessageDeliveryMode.
Public property Destination
The Destination to send to or receive on. For SolOS-Topic Routing (TR) it must be ITopic or IQueue (null is not a valid value when sending the message).
Public property DiscardIndication
Returns true if one or more messages have been discarded prior to the current message, otherwise it returns false. Indicates congestion discards only and is not affected by message eliding.
Public property DMQEligible
Expired messages with this property set to true are moved to a Dead Message Queue when one is provisioned on the appliance. Default: false
Public property ElidingEligible
Setting this property to true indicates that this message should be eligible for eliding.
Public property Expiration
The UTC time (in milliseconds, from midnight, January 1, 1970 UTC) when the message is to expire. The expiration time is carried in the message when set to a non-zero value. Expiration time is not included when this value is set to zero.

Setting this property has no effect if the TimeToLive is set in the same message. The message expiration time is carried to clients that receive the message unmodified and does not affect the life cycle of the message. Set TimeToLive to a positive value to enforce message expiry in the network. When TimeToLive has a positive value, the Expiration is never carried in the message (defaulting to zero). However, it may be calculated and retrieved if the session property CalculateMessageExpiration is set to true.

if message Expiration time is not set in the message and the session property CalculateMessageExpiration is set to true, the Expiration time is calculated based on the message's TimeToLive. When enabled, the Expiration time retrieved will be the UTC time when the message is sent plus the message's TimeToLive. The Expiration time for received messages will be the UTC time when the message was received plus the TimeToLive of the message at the time it was received.

Public property HttpContentEncoding
The HTTP Content Encoding. If not present, null is returned.
Public property HttpContentType
The HTTP Content Type. If not present, null is returned.
Public property IsReplyMessage
Returns true if it is a reply message (reply to a request).
Public property ReceiverTimestamp
Gets the receive timestamp (in milliseconds, from midnight, January 1, 1970 UTC). Returns -1 if not present.
Public property Redelivered
Applies only when DeliveryMode is MessageDeliveryMode.PERSISTENT or MessageDeliveryMode.NON_PERSISTENT. Indicates if the message has been delivered by the appliance to the API before.
Public property ReplyTo
Represents the reply-to destination. Returns null if not present.
Public property SenderId
Represents the sender id. Returns null if not present.
Public property SenderTimestamp
Gets the sender timestamp (in milliseconds, from midnight, January 1, 1970 UTC). Returns -1 if not present or set.
Public property SequenceNumber
Represents the message sequence number. The set operation overrides the sequence number automatically generated by the session (if set). Returns null if not present.
Public property TimeToLive
The number of milliseconds before the message is discarded or moved to a Dead Message Queue. A value of 0 means the message never expires. The default value is zero.

Note that this property is only valid for Guaranteed Delivery messages (Persistent and Non-Persistent). It has no effect when used in conjunction with other message types unless the message is promoted by the appliance to a Guaranteed Delivery message.

Public property TopicSequenceNumber
Represents the Topic Sequence Number assigned by the appliance or the peer. Returns null if none is present
Public property UserCos
A setter/getter for User Class of service.

The Class of Service has different semantics for direct and guaranteed messages. For direct messaging, it determines the WRR weight for the message. For guaranteed messaging, it indicates the discard eligibility of the message if the endpoint is congested (see LowPriorityMsgCongestion)

Public property UserData
The user data part of the message (maximum: 36 bytes). Returns null if not present.
Public property UserPropertyMap
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.

Remarks
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.CreateUserPropertyMap();
msg.UserPropertyMap.AddString("message", "5");
Public property XmlContent
The XML content part of the message. Returns null if not present.
Top
See Also