0
votes

On a Logic App workflow, I'm trying to use the Service Bus Trigger (Topic Subscription / Peek-Lock) with splitOn for debatching. However, after enabling splitOn, I haven't been able to get the service bus message headers (properties).

Below the raw bodies I'm getting with and without splitOn.

Without splitOn I get all OOTB and custom properties/headers

"body": {
    "ContentData": "Y3VyaW9zaXR5IGtpbGxlZCB0aGUgY2F0IDop",
    "ContentType": "text/plain",
    "ContentTransferEncoding": "Base64",
    "Properties": {
        "Prop1": "Val1",
        "Prop2": "Val2"
    },
    "MessageId": "123",
    "To": null,
    "ReplyTo": null,
    "ReplyToSessionId": null,
    "Label": null,
    "ScheduledEnqueueTimeUtc": "0001-01-01T00:00:00Z",
    "SessionId": null,
    "CorrelationId": "ab05843a-aa00-4d05-9b58-c0723a786b4c",
    "SequenceNumber": 5,
    "LockToken": "abb0f31c-8693-4f77-a516-e575b686ffbc",
    "TimeToLive": "315360000000000"
}

With splitOn the properties/headers are no longer available.

"body": {
    "$content-type": "application/xml;charset=utf-8",
    "$content": "Y3VyaW9zaXR5IGtpbGxlZCB0aGUgY2F0IDop"
}   

Is there a way I can preserve these properties when using Service Bus Trigger and splitOn?

I know I could use a forEach within the workflow, but I'd prefer to use splitOn if possible.

1

1 Answers

0
votes

The product team confirmed that this is not supported by design. When we use the Service Bus single trigger (When a message is received in a topic subscription (peek-lock)) with splitOn, the messages we receive in the workflow (child messages based on the splitOn path) are different to the original one in Service Bus. Thus, the header properties are not preserved.

The workaround for this is to use ForEach within the workflow, so we can access the properties of the original message.

HTH