Overview of Web Services Reliable Messaging
In the real world, challenges are encountered in delivering messages. There can be network/connection problems.
Consequently, messages can be lost or delivered out of order. Web
Services Reliable Messaging (WS RM) provides a mechanism to ensure a layer of reliability between potentially unreliable or intermittently connected
It provides an interoperable protocol that a
RM (Reliable Messaging) Source and RM Destination
use to provide Application Source and Destination a guarantee that the
message that is sent will be delivered. This guarantee is known as delivery assurance.
There are four basic delivery assurances that endpoints can provide
Messages will be delivered at most once without duplication . It is
possible some messages in a sequence may not be delivered
Every message sent will be delivered. Some messages may be delivered
more than once.
Every message sent will be delivered without duplication.
Messages will be delivered in the order that they were sent.
WS RM is one of the enterprise features in Project Tango which is Sun's JavaWeb Services
interoperability project with Windows Communication Foundation WCF
In Project Tango, RM is enabled in endpoints by the presence of
RM policy assertions in the WSDL.
Netbeans IDE will provide configurable settings to easily enable RM in endpoints
- Developer writes Producers/Consumers using JAX-WS 2.0 apis.
- Developer/Deployer supplies config files which would be wsdls
containing Policy assertions to enable/control Tango
- Config file can be written by hand or easily produced by Tango
Message exchanges when RM is enabled
When the Client or Application Source sends a message for reliable delivery.
When RM is enabled, Project Tango's RM Source module is plugged into
the JAX-WS remoting system.
The RM Source module keeps copies of messages until their receipt is acknowledged (via the exchange of protocol messages) Similarly, an RM Destination module
acknowledges messages (and may buffer them for order guarantees).
After guaranteeing order (if ordering enabled), the RM Destination allows
the message to proceed through the JAX-WS dispatch for delivery to the
Endpoint or Application Destination.
- The RM Source requests creation of a new Sequence by initiating a
- The RM Destination creates the Sequence by returning a
with globally unique identifier.This sequence id would be used to
identify the sequence and will be sent in all the following messages.
- The RM Sources begins sending messages with MessageNumber 1 .
- After 3 messages it sends LastMessage token.
- The 2nd message is lost in transit
- The RM Destination acknowledges receipt of message numbers 1 and
3 in response to LastMessage.
- The RM Source retransmits 2nd message which has the same sequence
identifier and message number so that the RM Destination can recognize
it as equivalent of earlier message.
The RM Source also includes an AckRequested so RM Destination can expedite
- RM Destination receives the second transmission and
the receipt of messages 1,2 ,3.
- The RM Source receives the acknowledgement and sends Terminate
Sequence to RM Destination.
The RM Destination receives TerminateSequence and reclaims resources
associated with the Sequence
We tested our WS RM implementation with Microsofts WCF at the href="http://groups.yahoo.com/group/soapbuilders/message/10603">Plugfest
on March 7-9 at Redmond.
We successfully interoperated in the
ReliableOneWay and ReliableRoundrip scenarios both as clients and