Question:
Last week, I outlined the basic approach used in VistA HL7 (and many HL7v2 implementations) to implement reliable message delivery. Unfortunately, we didn't have as much time as I would have liked to look at the strong and weak points of MLLP and HTTP as message delivery protocols. it should be clear that MLLP attempts to implement such things as flow ontrol and retransmission in an application layer protocol, and approach having some significant disadvantages. But beyond that, it should be clear that with some notable exceptions (e.g., SMTP, NNTP, HTTP) there really are no standards for message a delivery. Stream Control Transfer Protocol (SCTP) is a new transport protocol that is somewhat of an exception to this rule, providing reliable delivery of messages (and not byte streams, as is the case with TCP), but in general message oriented application protocols tend to define their own transport mechanisms, and the proliferation of message oriented middleware (sometimes
called MOM) products is a testament to the lack of standardization in this area.
Answer:
HTTP doesn't. It's a simple request/reply protocol with no provisions for retransmission. When HL7 operates in enhance mode (so, really it's not an MLLP issue, but an HL7 issue) each message has an identifier called the message contol ID, and it appears in the header (MSH) segment. When a message is transmitted, the HL7 process will attempt to read an accept acknowledgment (also called a commit acknowledgment) over the same onnection. The CA indicates successful transmission to HL7, and there ar also commit errors and commit rejects (the latter frequently being the result of a duplicate MID). Messages are queued and will be retransmitted until successfully acknowledged or rejected. An application acknowledgment will be sent later, after the message has been successfully procesed and a response generated. A second segment, the acknowledgment header (MSA) will include the acknowledgment status and the message control ID of the message being acknowledged. Two other facilities
are used to pair messages: every message has a sending facility and receiving facility (VistA HL7 uses the institution number and domain name) and this needs to be a unique identifier. There are also strings called the sending and receiving applications that need to be unique identifiers on the respective systems -- they play a role that is in many ways analogous to port numbers in TCP or UDP.
The other important point is to have a configurable parameter to
control the amount of time before a retransmission is attempted
(controllable on a per-destination basis). Some applications try to
process the message immediately vs. queueing it which obviously can
impact the speed in which an ack is sent back. Of course network
latency comes into play as well.