MLLP Server

CLI Tool

Interactive TUI for managing outbox and dead letter queues.

Overview

mllp-cli is an interactive terminal UI for inspecting and managing the MLLP server’s message outbox and dead letter queue (DLQ). Browse queued messages, view full HL7 content, delete individual messages, purge queues, and replay failed messages from the DLQ back into the outbox.

Requirement: Stop the Server First

The database file uses an exclusive lock — only one process can access it at a time. If the server is running when you launch the CLI, the open call will time out and exit with:

Error opening database: timeout
Database may be locked by running server

Stop the server before running the CLI.

Usage

./mllp-cli -db outbox.db

The -db flag defaults to outbox.db in the current directory. Pass a different path if your database lives elsewhere:

./mllp-cli -db /var/lib/mllp/outbox.db

Interface

The screen is divided into three areas:

Left panel — Connectors. Lists every connector found in the database. Each entry shows the connector name and its current queue depths in the format name (outbox/dlq). For example, adt-feed (12/3) means 12 messages in the outbox and 3 in the DLQ. Navigating this list switches the right panel to show that connector’s messages.

Right panel — Messages. A table of messages for the selected connector and active queue (Outbox or DLQ). Columns are:

ColumnContents
IDNumeric sequence ID from the database
TypeHL7 message type extracted from MSH-9 (e.g. ADT^A01)
SizeMessage size in bytes or kilobytes
PreviewFirst 40 characters of the message, with \r shown as pipe symbols

Bottom — Status bar. Shows the active queue mode (OUTBOX or DLQ) and the available keybindings for the current view.

Keybindings

KeyAction
TabToggle between Outbox and DLQ views
VView the selected message in a scrollable modal
DDelete the selected message (confirmation required)
PPurge all messages in the current view (confirmation required)
RReplay selected message from DLQ to Outbox (DLQ view only)
Q / EscQuit

Keys are case-insensitive. Esc also closes any open modal.

Operations

View. Opens a scrollable modal showing the full HL7 message. Carriage returns (\r) are converted to newlines so each HL7 segment appears on its own line. Press Esc to close.

Delete. Removes a single message from the active queue. A confirmation dialog appears before the delete is committed. Use this to discard a specific bad message without affecting the rest of the queue.

Purge. Removes every message for the selected connector from the active queue. The confirmation prompt shows how many messages will be deleted. Immediate and irreversible.

Replay. Available in DLQ view only. Moves the selected message from the DLQ back into the outbox, assigning it a new sequence ID. The next time the server starts and processes the outbox, it will attempt delivery again. Use this after fixing a downstream connectivity or configuration issue.

The CLI binary (mllp-cli) is included alongside mllp-server in every release archive. See the Downloads page.