The following example shows a typical reliable message
exchange between two systems. This conceptual overview does not include
all possible messages that could be sent. For example, extra protocol
messages might be present.
The following steps describe the order of
events in this example:
- The protocol preconditions are established. These include policy
exchange, endpoint resolution, and establishing trust.
- The reliable messaging source (RM Source) requests the creation
of a new Sequence using a CreateSequence request.
- The reliable messaging destination (RM Destination) creates a
Sequence and returns its unique identifier.
- The RM Source begins sending messages in the Sequence starting
with a MessageNumber 1. In the example shown, the RM Source sends
three messages in the Sequence.
- The second message in the Sequence, shown by the name m2, is lost
in transit.
- The third message is the last in the Sequence, and the RM Source
includes an AckRequested header to ensure that it receives a Sequenceacknowledgment message
for the Sequence.
- The RM Destination acknowledges receipt of message numbers 1 and
3 in response to receiving the AckRequested header from the RM Source.
- The RM Source sends the unacknowledged message again with MessageNumber
2. The underlying transport treats it as a new message, but it has
the same Sequence Identifier and MessageNumber to ensure that the
RM Destination treats it as a duplicate of the earlier message. In
case both the original and the duplicate messages are received, the
RM Destination delivers only one to the receiving application. The
RM Source includes an AckRequested header in the retransmitted message
so that the RM Destination sends an immediate acknowledgment.
- The RM Destination receives the retransmitted message with MessageNumber
2 and acknowledges receipt of messages with MessageNumbers 1, 2 and
3.
- The RM Source receives this acknowledgment and sends a TerminateSequence to
the RM Destination to indicate that the Sequence is complete. The
TerminateSequence message indicates that the message with MessageNumber
3 was the last message in the Sequence. The RM Destination can free
any resources associated with the Sequence.
- The RM Destination receives the TerminateSequence message that
indicates the RM Source will not send further messages. The RM Destination
sends a TerminateSequenceResponse message to the RM Source.
Use WS-RM with WS-Security to ensure that you accept CreateSequence
requests only from trusted sources. For more information, see WS-Security.