Completely fair to drop a brain dump here if you’d ask me.
It might be a little tough to digest for readers, but it does provide a fair source to come to your ending question here.
I can however be very short with answering your question.
No, there is no mechanism in place to enforce delegation of events to a Subscribing Event Processor.
As the comment you’ve dug up from Allard points out, the Subscribing Event Processor do not have control from what node they receive events.
A Subscribing Event Processor will receive events from what we’ve called a SubscribingMessageSource.
In a default set up, the EventBus will be the SubscribingMessageSource for your processors.
Due to this, it will only receive events which have been published within that node of your application.
If you thus have your application scaled out (for fault tolerance reasons for example), events which occur on Node 1 will only be handled by Subscribing Event Processors on Node 1.
Logically, this thus also holds for events published under Node 2; they’ll only be handled by the Subscribing Event Processors on Node 2.
By far the simplest solution to enforce the desired coordination you’re looking for, is to use Tracking Event Processor.
Another thing you could do, is pretty tightly coupled to the fact that you want a given Subscribing Event Processor to control an Aggregate instance it’s events.
If you ensure the commands for every single Aggregate instance are handled by the same node, always, then you’re ensured that the given node will be the originating point of the Events for that Aggregate.
You’d thus effectively ensure that only that Node’s Subscribing Event Processor will receives the events for that Aggregate.
Although this works in theory, you will not be covered in the scenario that one of your nodes dies, as the command message routing would then be changed over.
Concluding, I’d try to start using Tracking Event Processor.
All this explaining here is again a pointer for me personally that changing over the default from subscribing to tracking for Axon 4 was a good decision; it just helps with dedicated routing.
Hope this sheds some light on your situation Robert.