The MLLP component is used for exchanging messages with external systems using the HL7 MLLP application protocol.
The component supports the following:
- A Camel consumer using a TCP Server
- A Camel producer using a TCP Client
The MLLP component uses byte[] payloads, and relies on Camel Type Conversion to convert byte[] to other types.
Maven users will need to add the following dependency to their pom.xml for this component:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-mllp</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> |
MLLP Consumer
The MLLP Consumer supports receiving MLLP-framed messages and sending HL7 Acknowledgements. The MLLP Consumer can automatically generate the HL7 Acknowledgement, or the acknowledgement can be specified using the CamelMllpAcknowledgement exchange property.
Message Headers
The MLLP Consumer adds these headers on the Camel message:
Key | MSH field | Example |
CamelMllpLocalAddress | ||
CamelMllpRemoteAddress | ||
CamelMllpSendingApplication | MSH-3 | APPA |
CamelMllpSendingFacility | MSH-4 | FACA |
CamelMllpReceivingApplication | MSH-5 | CAMEL |
CamelMllpReceivingFacility | MSH-6 | FACB |
CamelMllpTimestamp | MSH-7 | 20150106235900 |
CamelMllpSecurity | MSH-8 |
|
CamelMllpMessageType | MSH-9 | ADT^A04 |
CamelMllpEventType | MSH-9-1 | AD4 |
CamelMllpTriggerEvent | MSH-9-2 | A04 |
CamelMllpMessageControlId | MSH-10 | 12345 |
CamelMllpProcessingId | MSH-11 | P |
CamelMllpVersionId | MSH-12 | 2.3.1 |
CamelMllpCharset | MSH-18 |
All headers are String types. If a header value is missing, its value is null.
MLLP Producer
The MLLP Producer supports sending MLLP-framed messages and receiving HL7 Acknowledgements. The MLLP Producer interrogates the HL7 Acknowledgments and raises exceptions if a negative acknowledgement is received.
Message Headers
The MLLP Producer adds these headers on the Camel message:
Key | MSH field | Example |
CamelMllpLocalAddress | ||
CamelMllpRemoteAddress | ||
CamelMllpAcknowledgement | ||
CamelMllpAcknowledgementType | AA | |
CamelMllpSendingApplication | MSH-3 | CAMEL |
CamelMllpSendingFacility | MSH-4 | FACA |
CamelMllpReceivingApplication | MSH-5 | APPB |
CamelMllpReceivingFacility | MSH-6 | FACB |
CamelMllpTimestamp | MSH-7 | 20150106235900 |
CamelMllpSecurity | MSH-8 |
|
CamelMllpMessageType | MSH-9 | ADT^A04 |
CamelMllpEventType | MSH-9-1 | AD4 |
CamelMllpTriggerEvent | MSH-9-2 | A04 |
CamelMllpMessageControlId | MSH-10 | 12345 |
CamelMllpProcessingId | MSH-11 | P |
CamelMllpVersionId | MSH-12 | 2.4 |
CamelMllpCharset | MSH-18 |
All headers are String types. If a header value is missing, its value is null.