Two separate Microservices with Subscribing Event Processor?


I have split my application into two microservices. One is a CommandAPI and one is a Query API. The Command microservice applies an Event in the Aggregate and the Query microservice handles this event and stores data in db.

It looks like unless I use the Tracking Event processor, the Query microservice which is configured to use Subscribing Event Processor, cannot handle events published by the Command Microservice.

Is there a way to configure a Microservice that uses Subscribing Event Processor to be able to handle events published by a separately running Microservice?

Hi Serj,

Unfortunately this is not possible. You must use a TrackingEventProcessor or PooledStreamingEventProcessor to make the architecture you have setup work. The SubscribingEventProcessor handles the event on the same thread as the command, which is not possible if you have the Command handlers and Event handlers in separate processes.


Thank you very much, @brunch for your reply. Very helpful.