How the Dispatcher Works
Overview
Architecture
External Message Broker
↓
[Dispatcher] (ServiceActivator assembly)
↓
[Performer]
↓
[Message Pump - Reactor or Proactor
↓
[Message Mapper] (Deserialize)
↓
[Command Processor] (Handler Pipeline)
↓
[Your Handler]The Message Pump
Reactor Pattern (Blocking I/O)
Proactor Pattern (Non-blocking I/O)
Message Flow
1. Message Pump Retrieves Message
2. Message Deserialization
3. Request Context Creation
4. Handler Dispatch
5. Message Acknowledgment, Rejection, Requeue and Fallback
Configuration
Basic Dispatcher Configuration
Key Configuration Options
noOfPerformers
messagePumpType
timeOut
requeueCount and requeueDelayInMilliseconds
Dispatcher Lifecycle
Startup
Runtime
Shutdown
Error Handling
Defer Message Action Exception
Dead Letter Queues (DLQ)
Configuration Exception
Other Exception
Advanced Features
Dynamic Message Deserialization
Agreement Dispatcher
Competing Consumers
Monitoring and Observability
OpenTelemetry Integration
Health Checks
Control Bus
Best Practices
1. Choose the Right Concurrency Model
2. Configure Appropriate Timeouts
3. Use Dead Letter Queues
4. Implement Idempotent Handlers
5. Monitor and Alert
6. Scale with Competing Consumers
Relationship to ServiceActivator Assembly
Related Documentation
Summary
Last updated
Was this helpful?
