A source and a destination
Each [[route]] takes messages from one source and delivers them to one destination. Write them as inline tables, or as [route.source] and [route.destination] sections.
| Type | As a source (receives) | As a destination (sends) |
|---|---|---|
mllp | Listens on listen; MLLPS with tls. The sender gets an HL7 ACK per message. | Connects to address (host:port) and keeps the connection open; MLLPS with tls. The receiver's ACK decides the outcome. |
http | POST to path on listen, the message as the body (REST) or in a SOAP envelope; HTTPS with tls. The response carries the ACK. | POST to url, REST or SOAP, with custom headers or OAuth2. HTTPS for https:// URLs. |
service_bus | Receives from a queue, or a topic and subscription, one message at a time. See Azure Service Bus. | Sends to a queue or topic. |
sftp | Polls a directory on an SFTP server and reads finished files: one message, messages back to back, or HL7 batches. See SFTP files. | Writes one file per message, or batch files closed by count, size or age. |
A route can also have several sources and destinations, with filters that decide which messages each destination gets: see Several sources and destinations. The details of each type are in HTTP, SOAP and MLLP out. Settings on the route itself:
| Setting | Default | Meaning |
|---|---|---|
name | required | Shown in the console, logs and metrics, and sent as X-Mllp-Route. |
mode | required | passthrough or store_and_forward. See Delivery modes. |
source | required | Where messages come from (above). |
destination | required | Where they go (above). |
request_timeout | 30s | How long one delivery attempt may take, including waiting for an MLLP ACK. |
max_message_bytes | 16 MiB | Larger messages are rejected. |
max_connections | 64 | Concurrent connections on a listening source. |
idle_timeout | 1h | Close a source connection that sends nothing for this long. |
What an HTTP destination receives
- Method and body: POST with the HL7 message as-is, segments separated by carriage returns (REST), or inside the SOAP envelope.
X-Hl7-Control-Id: MSH-10. Use it to make delivery idempotent: store-and-forward is at-least-once.X-Mllp-Route: the route's name.- Content-Type:
x-application/hl7-v2+er7for REST unless you setcontent_type; the SOAP version's type for SOAP.
Configurations from 0.1
Routes written for 0.1, with listen, listen_tls, target, target_tls, headers and content_type directly on the route, still work: they mean an MLLP source and an HTTP destination.
# 0.1 shorthand, still accepted: an MLLP source and an HTTP destination
[[route]]
name = "lab-oru"
listen = "10.10.10.10:7890"
target = "https://somewhere.com/lab/oru"
mode = "store_and_forward"
headers = { Authorization = "Bearer ${LAB_API_TOKEN}" }Containers that can't mount files can pass the whole configuration in the HL7EDGE_CONFIG_TOML environment variable. Run hl7-edge-gateway check to validate it before deploying.