IPWorks MQ 2020 C++ Builder Edition

Questions / Feedback?

MessageIn Event

Fires when the component receives a message.

Syntax

typedef struct {
  String SessionName;
  int SessionIndex;
  String LinkName;
  int LinkIndex;
  String MessageId;
  int State;
} TipqAMQPMessageInEventParams;

typedef void __fastcall (__closure *TipqAMQPMessageInEvent)(System::TObject* Sender, TipqAMQPMessageInEventParams *e);

__property TipqAMQPMessageInEvent OnMessageIn = { read=FOnMessageIn, write=FOnMessageIn };

Remarks

This event fires whenever the component receives a message. The message itself is automatically stored in the ReceivedMessage* properties.

Specifying a Delivery Outcome

The State parameter can be set to one of the following values to specify what delivery outcome the component should report to the sender (the default is Accepted (0)):
  • 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 set to Rejected (1), the component will include error metadata when it informs the sender of the outcome. Set the RejectErrorCondition and RejectErrorDescription configuration settings before the event handler finishes to specify this error information.

When State is set to Modified (3), the component can include additional metadata when it informs the sender of the outcome. Set zero or more of the ModifiedDeliveryFailed, ModifiedMessageAnnotations, and ModifiedUndeliverableHere configuration settings before the event handler finishes to specify this additional metadata.

Other Parameters

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.

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