Idempotent Receiver

Pattern Catalog

Previous Previous   Next Next

Site Home • Patterns Home • Table of Contents

Even when a sender application only sends a message once, the receiver application may receive the message more than once.

How can a message receiver deal with duplicate messages?

Design a receiver to be an Idempotent Receiver--one that can safely receive the same message multiple times.

The term idempotent is used in mathematics to describe a function that produces the same result if it is applied to itself, i.e. f(x) = f(f(x)). In Messaging this concepts translates into the a message that has the same effect whether it is received once or multiple times. This means that a message can safely be resent without causing any problems even if the receiver receives duplicates of the same message.

...

Related patterns: Command Message, Guaranteed Delivery, Messaging, Resequencer


Discuss this pattern on the Wiki. The Wiki allows you to add comments / suggestions for each pattern and even to add new pages. Simply follow this link and click "Edit" at the bottom of the window.   [How to use a Wiki.]  [EAI Patterns Wiki Home Page]

For a full description of the pattern see:

Enterprise Integration PatternsEnterprise Integration Patterns
Gregor Hohpe and Bobby Woolf
ISBN 0321200683
650 pages
Addison-Wesley


Home • Patterns • Table of ContentsPrevious Previous   Next Next