I have an application that will be receiving messages via ActiveMQ and the handlers for these messages will be sending commands via the command gateway. I have read that the event store will use optimistic locking to make sure that the aggregate state (I’m using @EventSourcingHandlers) stays consistent. Do I need to use “consistent routing” to send all commands for a specific aggregate to a specific instance of my application? Do I need to set up the DistributedCommandBus? Or, will simply using a local command bus and the optimistic locking suffice? Obviously all instances share the same RDBMS-based (JPA) event store.
Thanks,
James