Enterprise Integration & Reliability

Source review

By Vilas Wibhandik, Principal Consultant

Why business-system integrations fail silently: a control model for detection, reconciliation and safe recovery

An API can return success while the business transaction remains incomplete.

A message can be accepted by a queue and fail later. A timeout can leave the sender unsure whether the receiver committed the transaction. A retry can create a duplicate. A technically valid payload can be rejected by a business rule. A record can reach one system without the corresponding financial, inventory or fulfillment effect appearing in another.

These are not unusual edge cases. They are normal distributed-system conditions that need explicit controls.

The reliability question is therefore not, “Did the call succeed?” It is:

Can the organization prove that each required business transaction was received, validated, committed and reconciled—or identify who owns the exception?

This article introduces a four-state integration ledger and maps common failure modes to prevention, detection, recovery and ownership.

The four-state integration ledger

The ledger is a logical control model. It can be implemented in middleware, an integration database, application tables, durable messages or another governed component. The important point is that the states are observable and tied to a business identifier.

1. Received

The integration boundary has accepted an input and assigned or recognized a stable transaction identity.

Evidence may include:

  • source and message type;
  • stable business key or idempotency key;
  • received time;
  • schema or contract version;
  • integrity check;
  • correlation identifier; and
  • non-sensitive processing status.

“Received” does not mean valid or committed. It proves only that the boundary has custody of the request or event.

2. Validated

The payload has passed structural, reference and business preconditions required before committing it.

Validation may check:

  • required fields and data types;
  • allowed values;
  • customer, vendor, item or account references;
  • company and currency;
  • quantity and amount constraints;
  • duplicate policy;
  • authorization context; and
  • whether the receiving process is open for the transaction.

A validation failure should produce a controlled exception with enough information for the owner to act, but without logging secrets or unnecessary personal or financial content.

3. Committed

The authoritative target has accepted the business effect under its transaction rules.

Commit evidence should identify the target record or document, the resulting status and any partial or deferred work. If the target starts an asynchronous process, acceptance into that process may not be the final commit state. Define the boundary precisely.

This is where timeout ambiguity matters. The sender may not receive a response even though the target committed. Blind retry can then duplicate the business effect.

4. Reconciled

The source intent and target business result have been compared according to the control that matters.

Reconciliation can be:

  • one-to-one record status;
  • count and control-total comparison;
  • amount and currency comparison;
  • inventory movement comparison;
  • document-chain completeness;
  • exception aging; or
  • period-level financial reconciliation.

Reconciled does not always mean “identical.” Approved transformation, aggregation, currency conversion or timing can create valid differences. The control needs an owner, tolerance and evidence for accepted differences.

Seven common failure modes

Timeout ambiguity

The caller sends a request but does not receive a definitive response. The target may have committed, rejected or never received it.

Prevention: stable idempotency key, bounded operation, clear timeout contract.
Detection: queryable transaction status and correlation across systems.
Recovery: check target state before retrying; retry only when the operation is safe.
Owner: integration operations with access to both sides.

Partial commit

One step completes while a later step fails: for example, an order is created but allocation, posting or downstream notification does not complete.

Prevention: transaction boundaries where available, compensating design and explicit multi-step state.
Detection: expected-state transitions and aging monitors.
Recovery: resume, compensate or route to controlled manual completion.
Owner: business-process owner and application owner together.

Duplicate delivery

A message or request is delivered more than once because of retry, queue semantics, resubmission or operator action.

Prevention: idempotent receiver behavior and stable business keys.
Detection: duplicate-key or replay records, not merely log-text matching.
Recovery: reject a true duplicate or link it to the existing result.
Owner: receiving application or integration component that controls commit.

Poison message

A message repeatedly fails because its content, reference data or rule assumptions cannot be processed.

Prevention: contract validation and controlled reference-data synchronization.
Detection: bounded retry followed by an exception or dead-letter state.
Recovery: correct data or rule assumptions, then replay under authorization.
Owner: named exception queue owner; not an unmonitored mailbox.

Schema or contract drift

The sender and receiver disagree about field meaning, optionality, enumeration, precision or version.

Prevention: versioned contracts, compatibility rules and consumer testing.
Detection: validation failures and contract-version telemetry.
Recovery: translate, roll back or deploy a coordinated version change.
Owner: product or integration owners on both sides.

Stale reference data

A transaction references an item, account, site, customer or dimension that is absent or out of date downstream.

Prevention: master-data ownership and synchronization order.
Detection: referential validation and exception classification.
Recovery: correct reference data, then replay the held transaction.
Owner: master-data steward and receiving process owner.

Downstream business rejection

The payload is technically valid but violates a business state: a period is closed, a document is already posted, credit is blocked or inventory rules cannot be satisfied.

Prevention: preconditions where safe and clear rejection contracts.
Detection: business outcome status, not only transport status.
Recovery: route to an accountable business owner; do not retry unchanged.
Owner: the team authorized to resolve the business condition.

Retry and circuit breaking are different controls

Microsoft’s Azure Architecture Center describes retry as a way to handle failures that may be transient by repeating an operation under a controlled policy. It also warns that aggressive retry can make a busy or failing service worse and that operations should be idempotent when possible.

A retry policy should classify outcomes:

  • retry immediately only when the failure is brief and retry-safe;
  • retry after increasing delay when a dependency needs recovery time;
  • do not retry when the failure is permanent or requires changed data;
  • stop after a bounded attempt count; and
  • expose exhausted work as an owned exception.

A circuit breaker addresses a different problem. It prevents repeated calls to a dependency that is likely to fail, then probes recovery after a defined interval. It protects the caller and the dependency from cascading load. It does not complete or reconcile the business transaction.

Use both only when their state and ownership are visible. A retry hidden inside multiple layers can multiply attempts, obscure elapsed time and create unexpected duplicates.

Idempotency is a business rule, not a header

An idempotency key is useful only when the receiver can connect repeated attempts to one business intent and return or reconstruct the same outcome safely.

Define:

  • who creates the key;
  • its uniqueness scope;
  • how long it is retained;
  • which fields must match on replay;
  • what happens when the first attempt is still in progress;
  • whether a failed validation can be corrected under the same key; and
  • how operators distinguish replay from a new transaction.

Some operations are naturally idempotent; others need a receipt table, unique constraint, state machine or compensating design. “Exactly once” should not be claimed from transport behavior alone.

Exception ownership and safe replay

Every terminal exception needs:

  • category;
  • business key and correlation ID;
  • current state;
  • reason safe for the intended audience;
  • accountable team or role;
  • age and service target;
  • permitted actions;
  • replay preconditions; and
  • audit of the resolution.

Replay must use the same validation and idempotency controls as the original path. Operators should not bypass controls by editing production data or resending files outside the governed interface.

A queue without ownership is deferred failure, not reliability.

Reconciliation closes the control loop

Operational dashboards often count requests, successes and errors. Those metrics are useful but insufficient. Reconciliation asks whether the business population is complete.

A practical reconciliation design defines:

  1. the source population for a time window or batch;
  2. the expected target population and transformation;
  3. control counts and totals;
  4. timing and tolerance;
  5. approved exclusions;
  6. exception detail and owner;
  7. rerun or correction procedure; and
  8. sign-off evidence.

For financial or inventory processes, control totals may be more important than one-to-one record identity. For master data, completeness and uniqueness may dominate. For order flows, the document chain and final business status may be the right evidence.

The control must match the risk.

Synchronous, queued and scheduled patterns

A synchronous request can provide immediate validation and status, but it couples availability and response time. A queued design can absorb load and isolate dependencies, but it requires durable state, idempotency and exception operations. Scheduled batch can simplify reconciliation and throughput, but increases latency and concentrates failure.

Choose based on:

  • required response time;
  • dependency reliability;
  • transaction volume and burst behavior;
  • ordering requirements;
  • business tolerance for delay;
  • ability to correct and replay;
  • reconciliation design; and
  • operating ownership.

Hybrid patterns are common. The key is to expose the transition between them in the four-state ledger.

Reliability review questions

  1. What stable identifier follows one business intent through every system?
  2. Can the receiver distinguish a retry from a new transaction?
  3. Which failures are transient, permanent or business-owned?
  4. What state exists after a timeout?
  5. Where do exhausted messages go, and who owns them?
  6. How are schema and reference-data changes coordinated?
  7. What proves committed transactions are complete and correct?
  8. How is replay authorized and audited?
  9. What prevents layered retries from amplifying load?
  10. Which reconciliation closes the control loop?

An integration is reliable when its failures are visible, bounded and recoverable—and when business completion can be proven beyond the transport layer.

Sources

Continue the decision

For platform-neutral integration engineering, see Enterprise Integration and Reliability. For source-to-target validation and control totals, see ERP Data Migration and Reconciliation.

This article is an architecture control model. The correct pattern depends on the actual business transaction, platform semantics, security requirements and operating capacity.