intermediateEvent Processors: Subscribing vs Tracking

Why is it risky to perform slow operations inside a subscribing event handler?

A subscribing event handler runs synchronously, inline, on the same thread as the command that published the triggering event, and it runs before that command is considered fully handled. If the handler performs something slow — a heavy database write, a call to an external service, a large computation — that slowness is added directly to the time the original caller waits for a response. There is no queue or buffer absorbing the delay, because the handler is not decoupled from the command at all. This is exactly the opposite of what most projections want: a read-model update should ideally happen without making every write to the system feel slower. For this reason, subscribing processors are reserved for narrow cases where a handler genuinely must complete before the command returns, rather than used as a general default.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to In a system with several microservices, how does an event published by one service end up reaching a handler running inside a completely different service?← Back to all Event-Driven Microservices questions