Targets
Optional and off by default. Like BizTalk's message tracking, but as plain files and rows: the raw message before a run starts (or before it is sent), plus the ACK that went with it. Outputs include archiveId, which links a run to its archived copy.
| Target | Setting | Layout |
|---|---|---|
| File | File:Path | Dated folders per source; file names sort in FIFO order, with a .json of metadata per message |
| NAS | Nas:Path (UNC), optional credentials on Windows | Same as File |
| SQL | Sql:ConnectionString, Sql:Table | One row per message or ACK with the MSH fields, MSA-1, endpoints, the decoded text and the raw bytes; the table is created automatically |
Configure it in a Logic App
App settings, shared by every trigger and send action on the host (the gateway reads its Archive section):
LamboHl7Mllp__Archive__Targets = File,Sql
LamboHl7Mllp__Archive__File__Path = /mnt/hl7-archive
LamboHl7Mllp__Archive__Sql__ConnectionString = @Microsoft.KeyVault(SecretUri=https://<vault>.vault.azure.net/secrets/hl7-archive-sql)
LamboHl7Mllp__Archive__Queue__ConnectionString = @Microsoft.KeyVault(SecretUri=https://<vault>.vault.azure.net/secrets/hl7-archive-queue)
LamboHl7Mllp__Archive__OnFailure = Reject- Spool queue: with
Queue:ConnectionStringset, a record a target can't take waits in an Azure Storage queue and is written later; the message is still acknowledged. - Nothing is ACKed without a copy: if neither the target nor the queue takes a record,
OnFailure=Reject(the default) answers AE/CE and the sender resends; Send message fails with 503 and sends nothing. - Order: read the archive with
ORDER BY EventTime, SequenceNumber(SQL) or by file name. - From App Service, outbound SMB (port 445) is blocked: use the SQL target, Azure Files mounted as a path, or a host with the share mounted.