Error Channel Pattern

Intent

Following are the patterns and principles used for error handling in integration applications with different conversation styles:

  • request-response
  • fire-and-forget

The Error Channel pattern is also known as the Dead Letter Channel and the Invalid Message Channel.

Context and problem

Distributed systems run on multiple processes and interact with an interprocess communication mechanism. Different interaction styles require different ways of handling and dealing with error conditions. Following some principles and patterns make designing and implementing the error conditions easier.

Forces and solution

Depending on the number of participants, the interaction can be one-to-one or one-to-many. Whether the service consumer expects a response, the interaction is classified as synchronous or asynchronous. Based on these dimensions, there is the following combination of interaction styles:

Interaction Style One-to-One One-to-Many
Synchronous request-response N/A
Asynchronous fire-and-forget Publish-subscribe

There are many aspects of service interactions. Conversation patterns by Gregor Hohpe is a great article covering the interactions between loosely coupled services. This chapter will not cover looking at service interaction mechanisms but focus instead on designing the service provider from an error handling point of view. The two styles we will look at are request-response and fire-and-forget.

Get hands-on with 1400+ tech skills courses.