Adapter: MLLP Outbound
Send HL7v2 messages via MLLP protocol to remote systems.
Purpose
Send one HL7v2 message over MLLP (TCP) and wait for its ACK, or send any data over raw TCP with custom frame bytes (see Raw TCP). With no message, the step sends the input's rawMessage, else the content of a file/SFTP pickup or a GCS get (never a binary, base64 one), else a text input as it is.
Auth
- None at the protocol level. Reach the receiver over a private network or a VPN tunnel, or turn on TLS with
tlsEnabled(with an optional pinned fingerprint, CA and client certificate).
Settings
Auth is no selector; the secret settings below are the credentials. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
host | string | Yes | No | Remote MLLP host address. | |
port | number | No | 2575 | No | Remote MLLP port (default: 2575). |
timeout | number | No | 30000 | No | Connect and ACK timeout in milliseconds, used when connectTimeoutMs or ackTimeoutMs is not set. |
connectTimeoutMs | number | No | No | TCP connect (and TLS handshake) timeout; defaults to timeout. | |
ackTimeoutMs | number | No | No | How long to wait for the ACK; defaults to timeout. | |
expectAck | boolean | No | true | No | Off: the send succeeds once the frame is flushed and no ACK is read. A failed no-ACK send is never resent. |
tlsEnabled | boolean | No | false | No | Send over TLS (MLLP over TLS 1.2+). |
tlsFingerprint256 | string | No | No | Pin the peer's certificate by SHA-256 fingerprint (AA:BB:…), for self-signed peers. Replaces CA verification. Needs tlsEnabled. | |
tlsCaPem | string | No | Yes | PEM CA certificate(s) to verify the peer against: only these (default) or added to the system store (tlsCaMode). Needs tlsEnabled. | |
tlsClientCertPem | string | No | Yes | PEM client certificate, for peers that require mutual TLS. Needs tlsEnabled. | |
tlsClientKeyPem | string | No | Yes | PEM private key for the client certificate. Needs tlsEnabled. | |
tlsCaMode | enum: replace, add | No | No | Trust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem. | |
tlsClientPfx | string | No | Yes | Client certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair. | |
tlsClientPassphrase | string | No | Yes | Passphrase of the PKCS#12 bundle. | |
tlsMinVersion | enum: TLSv1.2, TLSv1.3 | No | No | Lowest TLS version to accept (default TLSv1.2). | |
tlsServername | string | No | No | Host name to verify (SNI); defaults to host. Needs tlsEnabled. | |
encoding | enum: utf-8, iso-8859-1, windows-1252, ascii, msh-18 | No | utf-8 | No | Character set of the bytes sent and of the ACK: UTF-8 (default), ISO-8859-1, Windows-1252, ASCII, or msh-18 (the message's MSH-18). A message the charset cannot carry fails before anything is sent. |
sendingApplication | string | No | No | Overrides MSH-3 (sending application) on every message sent. | |
sendingFacility | string | No | No | Overrides MSH-4 (sending facility) on every message sent. | |
framing | enum: mllp, frame, eos | No | mllp | No | mllp (default: VT ... FS CR), frame (startBytes ... endBytes) or eos (write the message, then close the sending side; the response is everything until the peer closes). |
startBytes | string | No | No | Frame and eos: bytes before each message, as hex (02), 0x02 or <STX>. Empty: none. | |
endBytes | string | No | No | Frame: bytes after each message, e.g. 03 or 0x1C 0x0D. | |
responseCheck | enum: hl7-ack, none | No | hl7-ack | No | hl7-ack (default): the response must be an HL7 ACK for the message (AA succeeds). none: any response succeeds and is returned as response (raw TCP only). |
keepConnectionOpen | boolean | No | true | No | Reuse the connection for the next message (default). Off: open a connection per message and close it after. eos, and responseCheck none with a response read, always close (an unchecked reply cannot be matched to its message). |
binary | boolean | No | false | No | The message is base64; send the decoded bytes (Mirth's binary data type). Raw TCP only. |
Actions
A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
send | Send HL7v2 message via MLLP and receive ACK. | message | message, rawMessage |
Minimal example
The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.
{
"name": "MLLP Outbound (example)",
"adapterType": "mllp",
"config": {
"host": "example-host"
}
}Raw TCP
With framing set to frame or eos, the adapter sends like Mirth's TCP Sender in Basic TCP mode. frame wraps each message in startBytes and endBytes (hex such as 02, 0x02 or <STX>); eos writes the message, closes the sending side and reads the response until the receiver closes. With responseCheck: "none" any response succeeds and comes back as response; with the default hl7-ack it must be an HL7 ACK for the message. keepConnectionOpen: false opens a connection per message. eos always does, and so does responseCheck: "none" when a response is read: a response that is not checked cannot be tied to its message, so a late or extra reply left on a reused connection could reach the next message's run. Mirth's TCP Sender reuses the connection there; MedHook does not. binary: true takes the message as base64 and sends the decoded bytes. TLS, timeouts, the connection pool and the address checks are the same as for MLLP.
{
"host": "lis.example.test",
"port": 7100,
"framing": "frame",
"startBytes": "02",
"endBytes": "03",
"responseCheck": "none"
}Limits
connectTimeoutMsandackTimeoutMsdefault totimeout. A send whose ACK never came may have been processed, so it is not resent automatically.- An AE or AR ACK fails the step; see MLLP and ACKs.
sendingApplicationandsendingFacilityoverwrite MSH-3 and MSH-4 on every message.- A raw TCP response is read up to 10 MiB; a larger one fails the step as uncertain.