Back to Catalog
Integration
Messaging Endpoints
Event-Driven Consumer
React to messages the instant they arrive — no polling, no lag.
Intent & Description
Real-world Use Case
Fraud detection — payment events trigger a Lambda via SQS event source mapping. Lambda fires within milliseconds of message arrival, runs fraud scoring, and blocks the transaction if suspicious. A polling consumer checking every 30 seconds would be useless here.
Source
📌 TL;DR
Event-Driven Consumer = react the moment a message arrives. Zero polling lag, efficient idle resource use. The default choice for real-time processing. Pair with DLQ for error handling.
Advantages
- Near-zero latency between message arrival and processing start
- Resource-efficient — consumer is idle when no messages are arriving
- Scales naturally with Competing Consumers pattern
- Native support in all modern brokers and serverless platforms
Disadvantages
- Consumer must handle load spikes — sudden bursts can overwhelm it
- Backpressure management is harder than with polling (pull-based consumers control their own rate)
- Error handling for failed messages must be explicit (DLQ, retry logic)
- Can be harder to debug than polling — messages arrive unpredictably