Messaging and enterprise integration
Messaging separates the speed and availability of producers from consumers.
Core patterns
- Queue: one consumer group processes work.
- Publish/subscribe: several consumers receive an event.
- Dead-letter destination: isolates repeatedly failing messages.
- Idempotent consumer: repeated delivery does not repeat the business effect.
- Outbox: database change and event intent commit together.
Spring provides abstractions for Kafka, AMQP/RabbitMQ, JMS, Pulsar, and Spring Integration patterns. Choose the broker from ordering, throughput, retention, replay, routing, and operations—not the annotation you prefer.
Consumer design
Validate schemas, bound retries, add backoff and jitter, route poison messages, control concurrency, preserve correlation IDs, and observe lag/age. Acknowledge only after the durable business effect is safe.
Integration with SAP, Salesforce, and Workday
Wrap each external system with an adapter. Translate external data into the domain language. Apply timeouts, rate limits, circuit breakers, idempotency, and reconciliation. Do not let vendor schemas leak into every service.
Feynman check
A synchronous call is a phone conversation: both sides must be present. A queue is a mailbox: one side can leave a durable message and continue.