MLLP
Send and receive HL7 messages over TCP with the MLLP (Minimal Lower Layer Protocol) framing.
What’s inside
-
MLLP component, URI syntax:
mllp:hostname:port
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-mllp-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 36 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.mllp.accept-timeout | The SO_TIMEOUT, in milliseconds, of the server socket of the consumer: how long one accept() call waits for a new connection before the consumer checks that it is still running and waits again. It is also how long an idle thread of the consumer is kept. | 60000 | Integer |
camel.component.mllp.auto-ack | Whether the consumer generates the HL7 acknowledgement it sends back: AA when the exchange completes, AE when it fails, or the type set in the CamelMllpAcknowledgementType exchange property. An acknowledgement that the route sets in the CamelMllpAcknowledgement or CamelMllpAcknowledgementString exchange property is sent instead. The CamelMllpAutoAcknowledge exchange property overrides this option for one exchange. | true | Boolean |
camel.component.mllp.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.mllp.backlog | The backlog of the server socket of the consumer: the maximum length of the queue of incoming connections that are not accepted yet. A connection that arrives when the queue is full is refused. A value of 0 or less uses the default of the JVM (50). | 5 | Integer |
camel.component.mllp.bind-retry-interval | The time, in milliseconds, the consumer waits between two attempts to bind its server socket to the port (see bindTimeout). | 5000 | Integer |
camel.component.mllp.bind-timeout | How long, in milliseconds, the consumer keeps trying to bind its server socket to the port when it starts. Without lenientBind, the consumer fails to start when the port is not bound within this time. | 30000 | Integer |
camel.component.mllp.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to receive incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. If disabled, the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions by logging them at WARN or ERROR level and ignored. | true | Boolean |
camel.component.mllp.charset-name | The charset of an HL7 message that has no MSH-18. The consumer decodes, and the producer encodes, a message in the charset named in MSH-18 of the message, and in this charset when the message has no MSH-18, or MSH-18 names a charset that is not supported. The CamelCharsetName header and exchange property are not used. The default is the defaultCharset of the component (ISO-8859-1). | String | |
camel.component.mllp.configuration | Sets the default configuration to use when creating MLLP endpoints. The option is a org.apache.camel.component.mllp.MllpConfiguration type. | MllpConfiguration | |
camel.component.mllp.connect-timeout | The timeout, in milliseconds, for the producer to establish the TCP connection. 0 means no timeout. | 30000 | Integer |
camel.component.mllp.default-charset | The default of the charsetName option of the endpoints: the charset of an HL7 message that has no MSH-18, or whose MSH-18 names a charset that is not supported. | ISO-8859-1 | String |
camel.component.mllp.enabled | Whether to enable auto configuration of the mllp component. This is enabled by default. | Boolean | |
camel.component.mllp.exchange-pattern | The exchange pattern of the endpoint. The consumer always creates InOut exchanges: with autoAck disabled, InOnly sends no acknowledgement when the route sets none, while InOut reports a missing acknowledgement as an error. With InOnly, the producer sends the message without waiting for an acknowledgement. | inout | ExchangePattern |
camel.component.mllp.hl7-headers | Whether the consumer sets the CamelMllp headers from the fields of the MSH segment of the received message, such as CamelMllpMessageType from MSH-9. | true | Boolean |
camel.component.mllp.hostname-verification | Whether the producer checks that the certificate of the server matches the host it connects to, when SSL/TLS is used. When disabled, any certificate accepted by the trust store is accepted, whatever host it was issued for. | true | Boolean |
camel.component.mllp.idle-timeout | The time, in milliseconds, after which a connection with no activity is ended. The producer closes or resets its connection, as set by idleTimeoutStrategy, and opens a new one for the next message. The consumer resets a client connection that has received no message for this time, checked each time the receiveTimeout expires. Not set, or 0 or less, disables the idle timeout. | Integer | |
camel.component.mllp.idle-timeout-strategy | What the producer does with a connection that has been idle for idleTimeout: RESET sets SO_LINGER to 0 and closes the socket, which resets the connection; CLOSE closes the socket gracefully. The consumer always resets an idle connection. | reset | MllpIdleTimeoutStrategy |
camel.component.mllp.keep-alive | Whether to enable the SO_KEEPALIVE socket option on the TCP connections of the producer and of the consumer. | true | Boolean |
camel.component.mllp.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.mllp.lenient-bind | Whether the consumer starts without waiting for its server socket to be bound. When enabled, the consumer binds the port in a background thread, retrying until bindTimeout, and the route starts even when the port is not available yet. When disabled, the consumer fails to start when it cannot bind the port within bindTimeout. | false | Boolean |
camel.component.mllp.log-phi | Whether to log PHI (protected health information): the content of the HL7 messages and acknowledgements in log entries and exception messages. | false | Boolean |
camel.component.mllp.log-phi-max-bytes | The maximum number of bytes of PHI that is logged in a log entry, when logPhi is enabled. | 5120 | Integer |
camel.component.mllp.max-buffer-size | Maximum size, in bytes, of the buffer used when receiving or sending data over the wire. | 1073741824 | Integer |
camel.component.mllp.max-concurrent-consumers | The maximum number of client connections the consumer serves at the same time, each in its own thread. A new connection that arrives when this number of connections is active is reset. | 5 | Integer |
camel.component.mllp.min-buffer-size | Minimum size, in bytes, of the buffer used when receiving or sending data over the wire. | 2048 | Integer |
camel.component.mllp.read-timeout | The SO_TIMEOUT, in milliseconds, used once the start of an MLLP frame has been received: how long each further read waits for the rest of the frame. When it expires, the producer fails the exchange with an MllpAcknowledgementTimeoutException, and the consumer resets the connection. | 5000 | Integer |
camel.component.mllp.receive-buffer-size | The SO_RCVBUF socket option, in bytes: the size of the receive buffer of the operating system for the sockets of the producer and of the consumer. The operating system takes it as a hint. A value of 0 or less keeps the default of the operating system. | 8192 | Integer |
camel.component.mllp.receive-timeout | The SO_TIMEOUT, in milliseconds, of the first read of a message: how long the producer waits for the acknowledgement to start arriving, and how long the consumer waits for data on a connection before it checks the idleTimeout and waits again. | 15000 | Integer |
camel.component.mllp.require-end-of-data | Whether an MLLP frame must end with END_OF_BLOCK (0x1c) followed by END_OF_DATA (a carriage return, 0x0d), as the MLLP standard specifies. Some systems do not send the final END_OF_DATA byte: disable this option to accept a frame that ends with END_OF_BLOCK. Applies to the messages the consumer receives and the acknowledgements the producer receives. | true | Boolean |
camel.component.mllp.reuse-address | Whether to enable the SO_REUSEADDR socket option, on the server socket of the consumer and on the socket of the producer. | false | Boolean |
camel.component.mllp.send-buffer-size | The SO_SNDBUF socket option, in bytes: the size of the send buffer of the operating system for the TCP connections of the producer and of the consumer. The operating system takes it as a hint. A value of 0 or less keeps the default of the operating system. | 8192 | Integer |
camel.component.mllp.ssl-context-parameters | Sets the SSLContextParameters for securing TCP connections. If set, the MLLP component will use SSL/TLS for securing both producer and consumer TCP connections. This allows the configuration of trust stores, key stores, protocols, and other SSL/TLS settings. If not set, the MLLP component will use plain TCP communication. The option is a org.apache.camel.support.jsse.SSLContextParameters type. | SSLContextParameters | |
camel.component.mllp.string-payload | Whether the consumer sets the body to a String, decoded in the charset named in MSH-18 of the message, or in charsetName when the message has no MSH-18 or MSH-18 names a charset that is not supported. When disabled, the body is the byte array as received, and the CamelCharsetName exchange property holds that charset. | true | Boolean |
camel.component.mllp.tcp-no-delay | Whether to enable the TCP_NODELAY socket option (which disables Nagle’s algorithm) on the TCP connections of the producer and of the consumer. | true | Boolean |
camel.component.mllp.use-global-ssl-context-parameters | Whether to use the global SSLContextParameters of the CamelContext for the endpoints that have no sslContextParameters. | false | Boolean |
camel.component.mllp.validate-payload | Whether to validate the HL7 payloads received (an MSH segment first, a segment delimiter at the end, no MLLP framing bytes inside). The consumer fails the exchange of an invalid message with an MllpInvalidMessageException. The producer fails the exchange with an MllpInvalidAcknowledgementException when the acknowledgement is invalid or has no MSA segment. | false | Boolean |