Skip to content
LambogeniusDocs

HL7 MLLP Connector for Azure Logic Apps

Sending messages

Send message options, outputs, error codes, and retrying on negative ACKs.

Service provider/serviceProviders/lamboHl7MllpLicensed together with the HL7 v2 Codec. One token covers both.

Inputs

The options mirror a BizTalk MLLP send port.

InputMeaning
messageThe HL7 message or batch to send. Segment terminators are normalized to CR unless normalizeSegmentTerminators is false.
waitForAckWait for the acknowledgement (solicit-response). Default true.
ackTimeoutSeconds / connectTimeoutSecondsDefaults 30 and 15 seconds.
keepConnectionOpenKeep one pooled, persistent connection per endpoint; messages on it are serialized.
validateAckControlIdCheck that MSA-2 matches the sent MSH-10. Default true.
failOnNegativeAckFail the action on AE/AR (CE/CR) so the retry policy resends.
archiveArchive the message before it is written to the connection, and the ACK received.

Example

Send an encoded message to the EMR, keep the connection open, and retry on a negative ACK:

"Send_to_EMR": {
  "type": "ServiceProvider",
  "inputs": {
    "parameters": {
      "message": "@{body('Encode_HL7')?['hl7Message']}",
      "waitForAck": true,
      "ackTimeoutSeconds": 30,
      "keepConnectionOpen": true,
      "failOnNegativeAck": true,
      "archive": true
    },
    "serviceProviderConfiguration": {
      "connectionName": "mllpEmr",
      "operationId": "sendMessage",
      "serviceProviderId": "/serviceProviders/lamboHl7Mllp"
    }
  },
  "retryPolicy": { "type": "fixed", "count": 3, "interval": "PT10S" }
}

Output

{
  "messageControlId": "MSG00042", "bytesSent": 1187, "remoteEndpoint": "10.20.1.15:2575",
  "connectionReused": true, "elapsedMs": 38,
  "ackReceived": true, "ackCode": "AA", "ackControlId": "MSG00042", "ackText": "", "isPositive": true,
  "ack": "MSH|^~\&|EMR|HOSP|LAB|HOSP|20261016093001||ACK^A01^ACK|A0001|P|2.5.1\rMSA|AA|MSG00042",
  "isBatch": false, "messageCount": 1, "archiveId": "…"
}

Errors

StatusWhen
502Connection, socket or MLLP protocol errors
504No ACK within ackTimeoutSeconds
403No valid license, or TLS is required and the connection doesn't use it
503Archiving is required but neither its targets nor the spool took the record (nothing is sent)

Outbound connections leave the Logic App directly. On App Service plans, private destinations need VNet integration.