Competing Consumers
Scalability pattern where multiple workers share a single EDI queue.
Definition
With Competing Consumers you attach N workers to a single queue: the broker hands each message to an available consumer, guaranteeing single processing. This parallelises EDI interchange processing and absorbs spikes. Caveat: strict message ordering across consumers is no longer guaranteed — hence session keys or message groups when order matters.
Origin
Catalogued in Enterprise Integration Patterns (Gregor Hohpe & Bobby Woolf, Addison-Wesley, 2003); also described as a pattern by the Microsoft Azure Architecture Center.
Example in context
Queue edi.inbound ← worker-1, worker-2, worker-3; one INVOIC goes only to worker-2, another to worker-1 — throughput ×3.
Related terms
- Backpressure EDI — regulating consumer flow.
- Idempotency — safety under redelivery.