Messaging Gateway

Pattern Catalog

Previous Previous   Next Next

Site Home • Patterns Home • Table of Contents

An application accesses another system via Messaging.

How do you encapsulate access to the messaging system from the rest of the application?

Use a Messaging Gateway, a class than wraps messaging-specific method calls and exposes domain-specific methods to the application.

The Messaging Gateway encapsulates messaging-specific code (e.g., the code required to send or receive a message) and separates it from the rest of the application code. This way, only the Messaging Gateway code knows about the messaging system; the rest of the application code does not. The Messaging Gateway exposes a business function to the rest of the application so that instead of requiring the application to set properties like Message.MessageReadPropertyFilter.AppSpecific, a Messaging Gateway exposes methods such as GetCreditScore that accept strongly typed parameters just like any other method. A Messaging Gateway is a messaging-specific version of the more general Gateway pattern [EAA].

...

Related patterns: Scatter-Gather, Asynchronous Implementation with MSMQ, Correlation Identifier, Messaging, Request-Reply


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