Part 21 · Applications

Spring Integration: adapters, channels and routing

Prerequisites: 01-ecosystem

How does one input become two processing paths?

Inbound adapter: file / external source; Transformer: normalize message; Router: evaluate record; Underwriting channel: accepted records; Review channel: malformed records. Connections: Inbound adapter to Transformer (message channel); Transformer to Router (normalized message); Router to Underwriting channel (valid); Router to Review channel (invalid)
Enterprise integration pattern example; channels can be synchronous or asynchronous. [S40] [S53]

Goal & mental model verified

Spring Integration models messages passing through channels and endpoints. Adapters connect external systems; transformers change representation; routers select destinations. Channel type affects threading and delivery behavior.

[S40] [S53]

Worked example · design exercise synthesis

An inbound insurer file adapter emits messages. A transformer normalizes records; a router sends valid records to underwriting and malformed ones to a review destination.

[S40] [S53]

Engineering decision synthesis

Use integration flows when multiple protocols and routing rules need explicit composition. Prefer a direct service call for a simple local interaction; each extra channel adds behavior to understand.

[S40] [S53]

Pitfall & diagnosis synthesis

Assuming every channel is asynchronous misreads the execution model. A slow endpoint can block a synchronous flow; unbounded asynchronous handoff can merely move overload into memory.

[S40] [S53]

Improve & validate synthesis

Choose and document channel capacity and error handling. Simulate slow consumers and malformed messages; inspect queue depth, rejection behavior and recovery ownership.

[S40] [S53]
Keep this: A diagrammed integration flow still needs a capacity model.
Check yourself: Is every Spring Integration channel async?

No. Channel implementation determines handoff and threading behavior.

Sources & further reading

  1. [S40] Integration overview

    Spring project maintainers · documentation · accessed 2026-10-09 · Documentation retrieved 2026-10-09

    Supports: Messages; Channels; Routers; Adapters

    Read the linked section to validate the mechanism and its version-specific constraints.

  2. [S53] Scheduling and async

    Spring project maintainers · documentation · accessed 2026-10-09 · Documentation retrieved 2026-10-09

    Supports: Executor/scheduler distinction; Async proxy invocation

    Read the linked section to validate the mechanism and its version-specific constraints.