Message Received Event

MessageReceivedEvent

You will need to have subscribed to the MessageReceivedEvent in order to receive messages. Both scheduled receiving and the ReceiveNow() method call will not fire until you are subscribed the MessageReceivedEvent.

These are the property members of that event:

  • Attachments — Gets the collection of attachment info structures.
  • Body — Gets the received body data.
  • CreatedDate — Gets the date the message was created by the sending instance.
  • EnqueuedDate — Gets the date the message was enqueued on the ISB.
  • IsAuditCopy — Gets a flag to indicate whether this message is an audit copy of the original message.
  • IsPrivilegedInstance — Gets a flag to indicate whether this message is delivered to your instance because your instance is configured as a privileged instance.
  • MessageId — Gets the message id.
  • OriginalMessageTrackingEnabled — Gets a flag to indicate if the original message had message tracking enabled if this is a privileged instance or audit copy
  • OriginalReceiverAlias — Gets the original receiver alias if this is a privileged or audit copy instance that can intercept messages for another instance.
  • OriginalReceiverId — Gets the original receiver ID if this is a privileged or audit copy instance that can intercept messages for another instance.
  • SenderInfo — Gets the sender instance info.
  • Tags — Gets the collection of custom tags

SenderInfo

To get more information about the sender of the message, SenderInfo exposes the ProgramInstanceInfo property members:

  • SenderInfo.ProgramId — Gets the program id.
  • SenderInfo.ProgramName — Gets the name of the program.
  • SenderInfo.ProgramInstanceId — Gets the program instance id.
  • SenderInfo.ProgramInstanceAlias — Gets the alias.

Attachments

If the message contains one or more file attachments, Attachments exposes the AttachmentInfo property members. See the section titled Attachments for more information.