onMessageOutcome (event)

Fires when a message's outcome is available.

Syntax

- (void)onMessageOutcome:(NSString*)sessionName :(int)sessionIndex :(NSString*)linkName :(int)linkIndex :(NSString*)messageId :(int)direction :(int)state;
func onMessageOutcome(_ sessionName: String, _ sessionIndex: Int32, _ linkName: String, _ linkIndex: Int32, _ messageId: String, _ direction: Int32, _ state: Int32)

Remarks

This event fires whenever the outcome for a message (incoming or outgoing) is available.

SessionName is the name of the session the message was transmitted on.

SessionIndex is the index of the session in the Session* properties.

LinkName is the name of the link the message was transmitted on.

LinkIndex is the index of the link in the Link* properties.

MessageId is the Id of the message; it may be empty if a message Id was not set.

Direction indicates whether this outcome was sent (0) or received (1).

State indicates the actual message outcome. Possible values are:

  • 0: Accepted - The message has been processed successfully.
  • 1: Rejected - The message failed to process successfully. Includes an error describing why.
  • 2: Released - The message has not been (and will not be) processed.
  • 3: Modified - Same as "Released", but with additional metadata for the sender.

When State is Rejected (1), the RejectErrorCondition and RejectErrorDescription configuration settings can be queried before the event handler finishes to retrieve the error information.

When State is Modified (3), the ModifiedDeliveryFailed, ModifiedMessageAnnotations, and ModifiedUndeliverableHere configuration settings can be queried before the event handler finishes to retrieve the additional metadata.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 iOS Edition - Version 20.0 [Build 8155]