O'Reilly logo

Java SOA Cookbook by Eben Hewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding Reliable Messaging

Problem

You think you might want to use reliable messaging (RM) in your applications.

Solution

Before jumping in, check out this introduction.

Messages get lost all the time. The sticky note falls off the fridge. The network has a slight hiccup. As a result, messages can be delivered out of order, or not at all. HTTP is an “unreliable” protocol, meaning that it does not guarantee that data will be delivered completely, or at all. HTTP is popular for many reasons, but when you’re sending SOAP messages over it in business transactions with dramatic financial implications, you need something to improve the reliability of your client/service interactions.

WS-ReliableMessaging (WS-RM) attempts to make up for the fact that the networks on which service technologies are based cannot guarantee that messages are properly delivered to their destinations. WS-RM gives us the idea of delivery assurance, which can take one of four forms:

AtMostOnce

Messages are delivered at most once, without duplication. Some messages can potentially get lost.

AtLeastOnce

Messages are guaranteed to be delivered, but it’s possible that some messages are delivered more than one time.

ExactlyOnce

No message will be duplicated.

InOrder

Messages will arrive at the service for processing in the order they were sent.

The last assurance, InOrder, can be combined with one of the other three to indicate your WS-RM policy regarding how many times messages can be delivered and whether they must be in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required