Contact Free trial Login

HL7 MLLP Connector

Support Category: Premium

HL7 MLLP Connector v2.1

The HL7 MLLP Connector provides connectivity and parsing functionality for HL7 MLLP messages.

Read through this user guide to understand how to set up and configure a basic flow using the connector.


This document assumes that you are familiar with HL7 MLLP, Design Center, Mule, Anypoint connectors, Anypoint Studio, elements in a Mule flow, and global elements.

What’s New in this Connector

First Mule 4 release.

To Connect in Design Center

  1. In Design Center, click a trigger such as an HTTP Listener or Scheduler and configure the trigger.

    Because the connector has only two operations to listen (source) and to send, you can choose which one to use.

  2. For the Listener (Source), click the trigger and select Mule HL7 MLLP.

  3. Click Edit to configure the connector.

    The basic non-secured way is to just input the host and the port within the connection tab.

    Design Center General Tab

    You also can create a TLS configuration, you can set the timeout configuration and the buffer configuration.

If your app is running at, you can send HL7 messages over MLLP to your Mule app to

Send Operation Configuration

For the Send operation the procedure is the same, the only extra thing is that you can set the Local Address Settings tab within the connector config with a different host, port, and delimiter that specifies the character used to separate messages.

Design Center TLS Tab

You can also set the send or receive buffer size.

Design Center Send and Receive Buffer Size

Connect in Anypoint Studio 7

You can use this connector in Anypoint Studio by first downloading it from Exchange and configuring it as needed.

Install Connector in Studio

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install this connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

Configure in Studio

  1. Drag and drop the connector to the Studio Canvas.

  2. For general settings, complete these fields:

    Studio General tab fields
    • Delimiter: The standard HL7 delimiter value that separates MLLP messages is a hexadecimal 0x1C character also known as FS. Applications in some clinics use a different delimiter value, which you can set in this field. The standard value in the HL7 MLLP connector is shown as 001C.

    • Host: Sets the socket`s host address.

    • Port: Sets the socket`s port.

      For an advanced connection, complete these fields:

    • Reuse address: Whether to reuse the configured socket or fail when trying to bind to the socket.

    • Send TCP With No Delay: Whether or not to transmit data immediately, or collect data for greater efficiency before sending.

    • Linger: How long in milliseconds that the socket takes to close so any remaining data transmits correctly.

    • Keep alive: Whether to close open socket connections that are unused for a long period and with an unavailable connection.

    • Fail on unresolved host: Whether the socket should fail during its creation if the host set on the endpoint cannot be resolved.

In the TLS tab you can configure a new TLS configuration, its presence implies the use of SSLServerSocket instead of plain TCP.

Studio Global Element Properties - TLS Tab

You can also set the send or receive buffer size.

Studio Send and Receive Buffer Size

Example - Read and Write Message

MLLP Demo Flow in Studio 7

MLLP Demo Flow in Studio 7

MLLP Demo Flow in Studio 7

This demo application provides a complete workflow to sequentially invoke read and write HL7 messages over the MLLP protocol.


  • Java 8

  • Anypoint Studio 7.x

  • Mule Runtime 4.x.x EE or higher

About the Flows

  • writer-flow: Sends the given message through the socket to be received by the reader-flow.

  • reader-flow: Receive a MLLP message, and log the message.

The app, index, styles, app-config, rest-service, order-controller, and write-order are used to load static resources related to the user interface.

Example Use Case XML

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="" xmlns:http=""
	<mllp:mllp-listener-config name="Mule_HL7_MLLP_Listener_config"
	doc:name="Mule HL7 MLLP Listener config">
		<mllp:mllp-listener-connection host="localhost" port="40000" />
	<mllp:request-config name="Mule_HL7_MLLP_Request_config"
	doc:name="Mule HL7 MLLP Request config">
		<mllp:mllp-requester-connection host="localhost" port="40000" >
			<mllp:local-address-settings port="49999" host="localhost" />
	<http:listener-config name="HTTP_Listener_config"
	doc:name="HTTP Listener config">
		<http:listener-connection host="localhost" port="8081" />
	<flow name="reader-flow">
		<mllp:mllp-listener doc:name="Mllp listener"
		<logger level="INFO" doc:name="Logger" message="#[payload]"/>
	<flow name="writer-flow">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<mllp:send doc:name="Send" config-ref="Mule_HL7_MLLP_Request_config">
	<flow name="index">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<parse-template doc:name="Parse Template"
	<flow name="styles">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<parse-template doc:name="Parse Template"
	<flow name="app-config">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/app-config"/>
		<parse-template doc:name="Parse Template"
	<flow name="app">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<parse-template doc:name="Parse Template"
	<flow name="rest-service">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<parse-template doc:name="Parse Template"
	<flow name="order-controller">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<parse-template doc:name="Parse Template"
	<flow name="write-order">
		<http:listener doc:name="Listener"
		<parse-template doc:name="Parse Template"