ERPClimb logoERPClimb
Reliable Messaging Patterns
Integration Suite & Cloud Integration (CPI)advanced 5 min read

CPI Reliability Part 1: Exception Subprocesses, Retries and Dead-Letter Handling

Lessons are open to try during our launch period. Some advanced content may move to Pro later. AI practice limits apply separately.

Key takeaway

Design error handling deliberately: exception subprocesses, distinguishing temporary from permanent errors, retry with JMS queues, dead-letter handling with limited retries, and alerting with the information support needs.

In this lessonShow sections

Visual overview

CPI Reliability Part 1: Exception Subprocesses, Retries and Dead-Letter Handling — learning sheetFlow: Error occurs → Exception subprocess → Temporary vs permanent → JMS retry with backoff → Dead letter and alert. Key ideas: EXCEPTION SUBPROCESS; CLASSIFY ERRORS; RETRY WITH JMS; DEAD LETTERS. Watch out: Retrying permanent errors forever blocks queues and floods logs.ERPClimb.com / CPI / LESSON 7/15 / LEARNING SHEETCPI Reliability Part 1: Exception Subprocesses, Retriesand Dead-Letter Handling1 · HOW IT FLOWS1Erroroccurs2Exceptionsubprocess3Temporaryvspermanent4JMS retrywithbackoff5Dead letterand alert2 · KEY IDEAS EXPLAINEDException SubprocessAn exception subprocess in an iFlow is triggeredwhen a step fails. It can read the exception via${exception.message}, log context, send an alert…Classify ErrorsTimeouts, connection errors and HTTP 503 areusually temporary: a later attempt may succeed.Validation errors, missing master data and HTTP…Retry With JmsAsynchronous scenarios decouple receipt fromprocessing with a JMS queue. The JMS senderadapter retries failed messages with configurable…Dead LettersAfter the maximum retries, the message shouldleave the active processing path — for example,being moved to a dead-letter queue or data store…3 · REMEMBER · WATCH OUTRememberException subprocesses catch errors and allow custom handling,notification or compensation.Temporary errors (timeouts, unavailable systems) should be retried;permanent errors (bad data) should not.JMS queues with retry intervals and maximum attempts provide reliableasynchronous retries.!Watch outRetrying permanent errors foreverblocks queues and floods logs.4 · IN A REAL PROJECTA receiver outage over a weekend caused 3,000 synchronous order messages to fail with no retry, and the senderdidn't resend. After redesign with a JMS queue and retries, the next outage resulted in all messages beingdelivered automatically once the receiver recovered.Original ERPClimb learning sheet • Verify against your SAP release and edition

The situation: a real project scenario

A receiver outage over a weekend caused 3,000 synchronous order messages to fail with no retry, and the sender didn't resend. After redesign with a JMS queue and retries, the next outage resulted in all messages being delivered automatically once the receiver recovered.

Explanation

This series covers reliability patterns. Part 1 is error handling and retry.

Exception subprocess: an exception subprocess in an iFlow is triggered when a step fails. Inside it you can read the exception via ${exception.message}, log context about what happened, send an alert, write a response back to the sender, or route the message to an error queue for later handling. Without an exception subprocess, the iFlow's default error behaviour applies, which usually just surfaces a generic failure with none of that context captured.

Classify errors: timeouts, connection errors and HTTP 503 responses are usually temporary, meaning a later attempt may well succeed once the underlying condition clears. Validation errors, missing master data and HTTP 400 responses are permanent until someone fixes the data or configuration that caused them. Handling both categories the same way leads either to messages that are retried forever for no benefit, or messages that are dropped when a retry would actually have worked.

Retry with JMS: asynchronous scenarios decouple receipt from processing by putting a JMS queue between them. The JMS sender adapter retries failed messages with configurable intervals, exponential backoff and a maximum number of attempts, all without the original sender needing to know a retry happened. This lets the sender get a quick acknowledgement while delivery to the receiver is retried safely in the background.

Dead letters: once the maximum number of retries is reached, the message should leave the active processing path, for example by moving to a dead-letter queue or a data store with a failed status, so it is available for analysis. This way support can diagnose and fix the underlying cause and resend the message deliberately, rather than it either blocking the queue indefinitely or simply disappearing.

Alerting: a useful alert contains the business key, the interface name, the error text and a link to the failed message, so the person receiving it can act without first having to go find that information themselves. Route alerts to the team that can actually fix the problem: technical errors to integration support, data errors to the business owners who can correct the underlying master data. A flood of generic, undifferentiated alerts trains people to ignore them.

How the SAP process fits together

SAP PROCESS EXPLORER · Integration: sender to receiver

ERPClimb.com

Reliable Messaging Patterns — process breakdown

Topic-specific conceptual flow: how key objects and decisions fit together. SAP configurations and exceptional cases can follow different paths.

1/4

Selected process stage

Decouple

JMS queues persist messages after receipt

Representative SAP learning flow, not a guarantee of system runtime sequence in every scenario.

Watch out

Common mistakes

No exception subprocess at all: without one, a step failure falls back to the iFlow's default error behaviour, which loses the specific context (business key, which step failed, why) that would otherwise help diagnose the problem quickly.

Retrying data errors forever: a validation failure or missing master data will not resolve itself on retry, so applying the same retry policy used for temporary errors to a permanent error just delays the inevitable failure while consuming retry slots and cluttering logs.

No maximum retry count: a retry policy without an upper bound can leave a bad message retrying indefinitely, tying up queue resources and hiding the fact that the message needs human attention.

Alerts without business keys: an alert that only contains a technical message ID forces the person responding to go search monitoring for context before they can even start diagnosing the issue, which turns a quick fix into a slow one.

Do this

Best practices

Classify errors as temporary or permanent as early as possible in the exception subprocess, and apply a retry policy only to the temporary category; route permanent errors straight to a business-facing alert instead of retrying them.

Use a JMS queue with configured retry intervals, exponential backoff and a maximum attempt count for asynchronous scenarios, so retries happen reliably without the sender needing to resend. Always cap retries and send genuinely failed messages to dead-letter handling with a clear status, so a bad message is visible for analysis instead of retrying silently forever.

Design alert content around what the recipient needs to act immediately: business key, interface name, error text and a direct link to the message, and route each alert to the team that can actually fix that category of problem.

In the interview

Interview angle

Interviewers ask how you design error handling and retries in Cloud Integration, including temporary versus permanent errors and dead-letter handling. A weak answer treats all failures the same way with a generic retry. A strong answer distinguishes temporary errors (timeouts, 503s, worth retrying with backoff via a JMS queue) from permanent errors (validation failures, worth surfacing immediately to a business owner instead of retrying), and explains why dead-letter handling with a retry cap is needed so a bad message does not retry forever.

Practice this lesson

Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.

Quick check

0 of 3 questions attempted

Question 1 of 3

Which type of error should typically be retried automatically?

Practise this in an interview

Answer in your own words and get instant feedback, the way an interviewer would judge it.

1How do you design error handling and retries for an asynchronous iFlow?

Frequently asked questions

Which errors should an iFlow retry automatically?

Temporary errors such as timeouts, connection failures or HTTP 503, which may succeed later. Permanent errors like validation failures or missing master data should be routed to an owner, not retried blindly.

How do JMS queues help with retries?

A JMS queue decouples receipt from processing: the sender gets a quick acknowledgement while the JMS sender adapter retries delivery with configurable intervals, backoff and a maximum number of attempts.

What happens after the maximum number of retries?

The message should leave the active path — for example to a dead-letter queue or data store — with an alert, so support can fix the cause and resend instead of the message blocking or disappearing.

Was this lesson helpful?

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.