# mulesoft HL7 MLLP Connector - Full Documentation
---
product: HL7 MLLP Connector
version: 2.2
is-latest-version: true
---
# HL7 MLLP Connector 2.2
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector HL7 Minimal Lower-Layer Protocol (MLLP) Connector (HL7 MLLP Connector) provides
connectivity and parsing functionality for HL7 MLLP messages.
For compatibility information and fixed issues, see the HL7 MLLP Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
- Anypoint Connectors
- Mule runtime engine (Mule)
- Elements and global elements in a Mule flow
- Creating a Mule app using Anypoint Studio or Anypoint Code Builder
- HL7 MLLP Connector
To use HL7 MLLP Connector, you must have:
- Purchased a MuleSoft license for HL7. Contact your Account Representative about purchasing a
license.
- Anypoint Studio or Anypoint Code Builder
## See Also
- [HL7 MLLP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/hl7-mllp-connector-release-notes-mule-4)
- [HL7 MLLP Connector in Anypoint Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-hl7-mllp-connector/)
---
product: HL7 MLLP Connector
version: 2.2
is-latest-version: true
---
# HL7 MLLP Connector 2.2 - Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Use these examples to read and write HL7 messages over the Minimum Lower-Layer Protocol (MLLP).
## Set Global Properties
Set these global properties before using the examples:
- Delimiter
The standard HL7 delimiter value that separates MLLP messages. It is a hexadecimal 0x1C character
also known as FS. Applications in some clinics use a different delimiter value in this field. The
standard value in the HL7 MLLP connector is shown as `001C`.
- Host
Sets the socket host address
- Port
Sets the socket 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) the socket takes to correctly close so any remaining data transmits.
- Keep alive
Whether to close open socket connections that are unused for a long period with an unavailable
connection.
- Fail on unresolved host
Whether the socket fails during its creation if the host (set on the endpoint) cannot be resolved.
- TLS tab
Configure a new TLS configuration. Its presence implies the use of SSLServerSocket instead of plain
TCP.
- Set the send or receive buffer size.
## Example - Read and Write Message
This example workflow sequentially invokes read and write HL7 messages over MLLP:
- 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.
## Read and Write HL7 Messages Over MLLP
```xml
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | x | |
Connection | Connection types that can be provided to this configuration. | x | ||
Expiration Policy | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances when appropriate. |
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Delimiter | String | Character code that separates MLLP messages. By default, MLLP uses | x | |
TLS Configuration | Uses SSLServerSocket instead of plain TCPServerSocket for accepting new SSL connections. | |||
Port | Number | Connection’s port number. | x | |
Host | String | Connection’s host name. | x | |
Reconnection | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | |||
Send Buffer Size | Number | Size of the buffer used when sending data, in bytes. This is set on the socket. | ||
Receive Buffer Size | Number | Size of the buffer used when receiving data, in bytes. This is set on the socket. | ||
Client Timeout | Number | SO_TIMEOUT value on the socket, which indicates the amount of time, in milliseconds, that the socket waits in a blocking operation before it fails. A value of | 0 | |
Reuse Address | Boolean | If | true | |
Send TCP With No Delay | Boolean | If | true | |
Linger | Number | SO_LINGER value, in milliseconds, which indicates how long the socket takes to close so that remaining data is transmitted correctly. | ||
Keep Alive | Boolean | If | false | |
Fail On Unresolved Host | Boolean | Whether the socket fails during its creation if the host set on the endpoint can’t be resolved. Set this value to | true | |
Connection Count | Number | Number of connections accepted at one time. This value can be an integer or DataWeave expression. An empty value, negative value, or value of | ||
Server Timeout | Number | SO_TIMEOUT value when the socket is used as a server. This is the timeout that applies to the accept operation. A value of | ||
Receive Backlog | Number | Maximum queue length for incoming connections. | 50 |
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | x | |
Connection | Connection types that can be provided to this configuration. | x | ||
Expiration Policy | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances when appropriate. |
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Local Address Settings | Address that a socket should bind to. | |||
TLS Configuration | Configuration for TLS, which can be used from both the client and server sides. | |||
Port | Number | Connection’s port number. | x | |
Host | String | Connection’s host name. | x | |
Reconnection | Configures a reconnection strategy to use when a connector operation fails to connect to an external server. | |||
Pooling Profile | Characteristics of the connection pool. | |||
Send Buffer Size | Number | Size of the buffer used when sending data, in bytes. This is set on the socket. | ||
Receive Buffer Size | Number | Size of the buffer used when receiving data, in bytes. This is set on the socket. | ||
Client Timeout | Number | SO_TIMEOUT value on sockets. This indicates the amount of time, in milliseconds, that the socket waits in a blocking operation before failing. A value of | 0 | |
Reuse Address | Boolean | If | true | |
Send TCP With No Delay | Boolean | If | true | |
Linger | Number | SO_LINGER value, which indicates how long, in milliseconds, the socket takes to close so that any remaining data is transmitted correctly. | ||
Keep Alive | Boolean | If | false | |
Fail On Unresolved Host | Boolean | If | true | |
Connection Timeout | Number | Number of milliseconds to wait until an outbound connection to a remote server is successfully created. Defaults to 30 seconds. | 30000 |
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Configuration | String | Name of the configuration to use. | x | |
Output Mime Type | String | MIME type of the payload that this operation outputs. | ||
Output Encoding | String | Encoding for the payload that this operation outputs. | ||
Primary Node Only | Boolean | Whether this source executes only on the primary node when running in a cluster. | ||
Streaming Strategy |
| Configures how Mule processes streams. Repeatable streams are the default behavior. | ||
Redelivery Policy | Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow. | |||
Reconnection Strategy | Reconnection strategy to use. |
Type | Binary |
Attributes Type |
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Configuration | String | Name of the configuration to use. | x | |
Content | Binary | Data to serialize and send through the socket. |
| |
Reconnection Strategy | Reconnection strategy to use. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Path | String | Path to the CRL file. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Url | String | URL of the OCSP responder. | ||
Cert Alias | String | Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Max Idle Time | Number | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | ||
Time Unit | Enumeration, one of:
| Time unit for the Max Idle Time field. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Host Address | String | Address of the host where the requests are sent. | ||
Host Name | String | Name of the host where the requests are sent. | ||
Local Certificates | Array of Any | SSL local certificates. If the socket is not an SSL socket, this value is null. | ||
Peer Certificates | Array of Any | SSL peer certificates. If the socket is not an SSL socket, this value is null. | ||
Port | Number | Port to which the requests are sent. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Path | String | Path to the keystore. Mule resolves the path relative to the current classpath and file system. | ||
Type | String | Type of keystore. | ||
Alias | String | Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file. | ||
Key Password | String | Password used to protect the private key. | ||
Password | String | Password used to protect the keystore. | ||
Algorithm | String | Algorithm used by the keystore. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Max Active | Number | Maximum number of Mule components that are active in a session at one time. When set to a negative value, there is no limit to the number of Mule components that are active at one time. When this value is exceeded, the pool is considered exhausted. | ||
Max Idle | Number | Maximum number of Mule components that can sit idle in the pool at any time. When set to a negative value, there is no limit. | ||
Max Wait | Number | Number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the Exhausted Action is set to | ||
Min Eviction Millis | Number | Minimum amount of time that an object can sit idle in the pool before it’s eligible for eviction. When set to a negative value, no objects are evicted from the pool due to idle time alone. | ||
Eviction Check Interval Millis | Number | Number of milliseconds between runs of the object evictor. When set to a negative value, no object evictor is executed. | ||
Exhausted Action | Enumeration, one of:
| Behavior of the Mule component pool when the pool is exhausted. Possible values are:
| ||
Initialization Policy | Enumeration, one of:
| Determines how components in a pool should be initialized. Possible values are:
| ||
Disabled | Boolean | If |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Frequency | Number | How often to reconnect, in milliseconds. | ||
Blocking | Boolean | If | ||
Count | Number | How many reconnection attempts to make. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Frequency | Number | How often to reconnect, in milliseconds. | ||
Blocking | Boolean | If |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Fails Deployment | Boolean | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:
| ||
Reconnection Strategy | Reconnection strategy to use. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Max Redelivery Count | Number | Maximum number of times that a redelivered request can be processed unsuccessfully before returning a | ||
Use Secure Hash | Boolean | If | ||
Message Digest Algorithm | String | Secure hashing algorithm to use if the Use Secure Hash field is | ||
Id Expression | String | One or more expressions that determine when a message was redelivered. This field can be set only if the Use Secure Hash field is | ||
Object Store | ObjectStore | Configures the object store that stores the redelivery counter for each message. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Max In Memory Size | Number | Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:
| ||
Buffer Unit | Enumeration, one of:
| Unit for the Max In Memory Size field. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Initial Buffer Size | Number | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of the Max In Memory Size value. | ||
Buffer Size Increment | Number | Amount by which the buffer size expands if it exceeds its initial size. Setting a value of | ||
Max Buffer Size | Number | Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a | ||
Buffer Unit | Enumeration, one of:
| Unit for the Initial Buffer Size, Buffer Size Increment, and Max Buffer Size fields. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Port | Number | Connection’s port number. | x | |
Host | String | Connection’s host name. | x |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Only End Entities | Boolean | Which elements to verify in the certificate chain:
| ||
Prefer Crls | Boolean | How to check certificate validity:
| ||
No Fallback | Boolean | Whether to use the secondary method to check certificate validity:
| ||
Soft Fail | Boolean | What to do if the revocation server can’t be reached or is busy:
|
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Enabled Protocols | String | Comma-separated list of protocols enabled for this context. | ||
Enabled Cipher Suites | String | Comma-separated list of cipher suites enabled for this context. | ||
Trust Store | Configures the TLS truststore. | |||
Key Store | Configures the TLS keystore. | |||
Revocation Check | Configures a revocation checking mechanism. |
| Field | Type | Description | Default Value | Required |
|---|---|---|---|---|
Path | String | Path to the truststore. Mule resolves the path relative to the current classpath and file system. | ||
Password | String | Password used to protect the truststore. | ||
Type | String | Type of truststore. | ||
Algorithm | String | Encryption algorithm that the truststore uses. | ||
Insecure | Boolean | If |