Detect and suspend duplicate AS2 messages in Logic App

We have recently introduced duplicate message detection feature for AS2 messages in Logic App. This blog post describes how to enable this feature and lists few example scenarios.

Configuring duplicate detection in agreement settings:

Navigate to your Integration Account -> Agreements -> <AS2 agreement> -> Edit -> Receive Settings -> Disallow Message ID duplicates

 

Look for the property isAS2MessageDuplicate in the output of the decode action to check whether the message was duplicate or not.

Examples:

  1. Check for duplicate messages is true and suspend duplicate messages is false
    • Agreement:
    • AS2 Decode output:
  2. Check for duplicate messages is true and suspend duplicate messages is true
    • Agreement:
    • AS2 Decode output:
      Note that isAS2MessageDuplicate property gets set to false here. That's because whenever there's a failure in the message, all of the message metadata like isAS2MessageSigned, isAS2MessageCompressed, etc. are set to false. The full failure message looks like this:
      "failed/failure: general-ediint-error-encountered Error: Message with AS2-From: Contoso, AS2-To: Fabrikam and MessageId: <RD00155D5C270B_CEDA56D1-FD2A-427B-83E7-918BFE42998A> is suspended as duplicate per party "Contoso" configuration settings"

Note:

  • Duplicate check is done only for received messages while decoding.
  • Message Id is used as the unique identifier of the message to identify duplicates.