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

CPI Reliability Part 2: Idempotency, Duplicate Checks and the Idempotent Process Call

Preview · a free account unlocks the full lesson

Key takeaway

Prevent duplicates when senders resend or retries occur: idempotency keys, the Idempotent Process Call step, duplicate checks at receivers, and how exactly-once is really achieved with at-least-once delivery.

Visual overview

CPI Reliability Part 2: Idempotency, Duplicate Checks and the Idempotent Process Call — learning sheetFlow: Message arrives → Derive stable key → Idempotent Process Call → Skip if already processed → Receiver duplicate check. Key ideas: WHY DUPLICATES HAPPEN; IDEMPOTENT PROCESS CALL; CHOOSING KEYS; RECEIVER-SIDE CHECKS. Watch out: Using a message ID that changes on resend makes duplicate detection useless.ERPClimb.com / CPI / LESSON 8/15 / LEARNING SHEETCPI Reliability Part 2: Idempotency, Duplicate Checks andthe Idempotent Process Call1 · HOW IT FLOWS1Messagearrives2Derivestable key3IdempotentProcessCall4Skip ifalreadyprocessed5Receiverduplicatecheck2 · KEY IDEAS EXPLAINEDWhy Duplicates HappenSenders resend after timeouts, JMS retries amessage whose first attempt actually reached thereceiver, or a user re-triggers a document. With…Idempotent Process CallThis step wraps a local process call and recordsthe IDs of successfully processed messages in arepository. When a message with the same ID…Choosing KeysThe key must be stable across resends: a documentnumber combined with sender system and documenttype, or a sender-provided unique message ID that…Receiver-Side ChecksWhere possible, receivers should reject or ignoreduplicates using external reference fields — forexample, a purchase order reference on sales…3 · REMEMBER · WATCH OUTRememberMost reliable delivery is at-least-once, so duplicates must beexpected and handled.The Idempotent Process Call step skips processing of a message IDalready processed successfully.A good idempotency key comes from the business, e.g. document numberplus sender, not a random ID.!Watch outUsing a message ID that changes onresend makes duplicate detectionuseless.4 · IN A REAL PROJECTAfter a network glitch, a bank resent a payment status file and customers received two payment confirmations.Introducing an idempotent process call keyed on the bank's file ID plus statement number stopped duplicateprocessing on later resends.Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Part 1 of this series covered retries. Part 2 handles the duplicates that retries can cause.

Why duplicates happen: senders resend after timeouts even though the first attempt actually reached the receiver, JMS retries a message that was already delivered, or a user re-triggers a document manually. With at-least-once delivery, which is the most reliable mode available, the same business message can legitimately arrive more than once, so duplicates have to be expected and handled rather than assumed away.

The Idempotent Process Call step wraps a local process call and records the IDs of messages that were already processed successfully, in a repository the step manages. When a message with the same ID arrives again, the subprocess inside is skipped and the flow can respond as if it had processed it again, without repeating the side effect. You choose the expression that becomes the ID.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

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.