Skip to content
Reference

Adapter: MLLP Outbound

Send HL7v2 messages via MLLP protocol to remote systems.

On this page

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.

SettingTypeRequiredDefaultSecretDescription
hoststringYesNoRemote MLLP host address.
portnumberNo2575NoRemote MLLP port (default: 2575).
timeoutnumberNo30000NoConnect and ACK timeout in milliseconds, used when connectTimeoutMs or ackTimeoutMs is not set.
connectTimeoutMsnumberNoNoTCP connect (and TLS handshake) timeout; defaults to timeout.
ackTimeoutMsnumberNoNoHow long to wait for the ACK; defaults to timeout.
expectAckbooleanNotrueNoOff: the send succeeds once the frame is flushed and no ACK is read. A failed no-ACK send is never resent.
tlsEnabledbooleanNofalseNoSend over TLS (MLLP over TLS 1.2+).
tlsFingerprint256stringNoNoPin the peer's certificate by SHA-256 fingerprint (AA:BB:…), for self-signed peers. Replaces CA verification. Needs tlsEnabled.
tlsCaPemstringNoYesPEM CA certificate(s) to verify the peer against: only these (default) or added to the system store (tlsCaMode). Needs tlsEnabled.
tlsClientCertPemstringNoYesPEM client certificate, for peers that require mutual TLS. Needs tlsEnabled.
tlsClientKeyPemstringNoYesPEM private key for the client certificate. Needs tlsEnabled.
tlsCaModeenum: replace, addNoNoTrust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem.
tlsClientPfxstringNoYesClient certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair.
tlsClientPassphrasestringNoYesPassphrase of the PKCS#12 bundle.
tlsMinVersionenum: TLSv1.2, TLSv1.3NoNoLowest TLS version to accept (default TLSv1.2).
tlsServernamestringNoNoHost name to verify (SNI); defaults to host. Needs tlsEnabled.
encodingenum: utf-8, iso-8859-1, windows-1252, ascii, msh-18Noutf-8NoCharacter 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.
sendingApplicationstringNoNoOverrides MSH-3 (sending application) on every message sent.
sendingFacilitystringNoNoOverrides MSH-4 (sending facility) on every message sent.
framingenum: mllp, frame, eosNomllpNomllp (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).
startBytesstringNoNoFrame and eos: bytes before each message, as hex (02), 0x02 or <STX>. Empty: none.
endBytesstringNoNoFrame: bytes after each message, e.g. 03 or 0x1C 0x0D.
responseCheckenum: hl7-ack, noneNohl7-ackNohl7-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).
keepConnectionOpenbooleanNotrueNoReuse 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).
binarybooleanNofalseNoThe 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.

ActionWhat it doesStep parametersKeys a message may supply
sendSend HL7v2 message via MLLP and receive ACK.messagemessage, 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.

json
{
  "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.

json
{
  "host": "lis.example.test",
  "port": 7100,
  "framing": "frame",
  "startBytes": "02",
  "endBytes": "03",
  "responseCheck": "none"
}

Limits

  • connectTimeoutMs and ackTimeoutMs default to timeout. 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.
  • sendingApplication and sendingFacility overwrite 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.

Reference