Dead-Letter Queue handling with Azure Service Bus

We have recently added a Dead Letter Queue (DLQ) Support to our AMQP Adapter. This document explains the use and configuration.

Scenario with Microsoft Azure Service Bus:

A sender channel on SAP PI/PO tries to consume a message from a queue.

In case the message processing fails before being persisted within PI, it is moved to a Dead Letter Queue

The question if a message gets persisted in PI (or not), depends on

the presence of an Integrated Configuration (ICO) or Sender Agreement (Dual-Stack) => this is always needed

the Adapter Module Configuration => additional modules can be added of course, but it something goes wrong, the message is not persisted

the staging settings of the Integrated Configuration on PO => if e.g. no receiver can be found during routing and the first staging is configured after receiver determination

Error example situation here: a not existing adapter module has been added to the channel configuration:

Now that we understand, how messages are moved to a DLQ, we can proceed consuming them as well.

In addition to the “real” integration flow, that consumes messages from a queue, an error handling flow will be implemented.

This is done by configuring an additional Sender Channel and ICO which makes sure the message is always persisted (e.g. without using adapter modules):

Of course you can define any follow-up action with this message from a DLQ. Sending an E-Mail is just an example. Another one would be sending the message back to sender as the message was invalid or sending it back to the queue after changing the configuration.