- 25 May 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Message De-Batching
- Updated on 25 May 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Overview
Message de-batching is very common in integration scenarios. When a batch message is received into BizTalk environment de-batching can happen in receive pipeline or in orchestration.
The feature provides following capabilities.
- Ability to log the batch message into main activity.
- Ability to archive the batch message
- Ability to link all the de-batched messages to their parent batch.
- Ability to allow de-batched messages to progress with their individual journey.
De-Batching in Receive pipeline
De-batching happens in the disassemble stage of a receive pipeline. When a batch message received, the stage before disassembly must have batch id tracked and configured in atomic scope.
In above screen shot the stage “ReceiveBatch” should be configured to track BatchId. This ensures that batched is present in BizTalk context in later stages.
This means that the batch itself is considered as a separate transaction. In this case the Batch is the transaction name. And this stage needs to be started and updated as well. And this transaction will be the parent of all the debatched messages.
The stage immediately after the disassembly must be marked for de-batching. This can be done in stage configuration.
There will be one entry in the tracking UI per transaction and they are identified with an icon as shown below.
You will have option to view all the transactions which came in one batch. The ui also provides and option to download the batch message.
View transactions from batch is going to display all the transactions belonging to a single batch. And also you can able to view the parent batch stage.
So by viewing the parent batch stage, you can also reprocess a batched message diretctly from the Atomic Scope portal.
De-Batching in Orchestrations
De-Batching in orchestration happens in a loop within an orchestration. When de-batching happens in orchestration, the Batch-Id must already be available in the context of the message. This means stages before the orchestration must already have tracked batch id.
Starting an activity should happen in construct shape or outside in an expression shape. The enriched message needs to be the de-batched message.
Debatching in Azure Scenarios
To leverage Atomic Scope's debatching functionality in Azure LogicApps , we ship a header called AS-BatchId and you need to pass any value which you need as a BatchId in this field.
- Similar to BizTalk orchestration , De-Batching happens in a loop in Azure LogicApps as well. The above BatchId should be the same for the whole activity.
- The stage immediately after the disassembly must be marked for de-batching. This can be done in stage configuration.
- View transactions from batch is going to display all the transactions belonging to a single batch.