Batch of commands

Hi there,

We’ve a usecase where a Saga will have to send a command to multiple aggregates when a certain event comes in.
In some situations we’re speaking of 10 000 aggregates. Put differently, 10 000 commands have to be sent over the wire.

We’re using Axon Framework 4.8.1, Axon Server (SE) for message routing and a SQL database for event storage.

We need some advice/pointers in order to build a robust solution.

  • What about backpressure: we need to prevent overflows in AxonServerCommandBus

  • Commands will be sent async → is there a way (callback?) to detect failed commands?

  • How to retry failed commands?

  • Do we need to send commands in chunks?

Happy to get some advice about this ‘batch case’

Hi Bram,

Could you give a few more details about your use case? Wondering if there is something else about how your system is designed we can leverage to avoid sending commands to so many aggregates. Is there some higher level concept they are all related to (e.g. - Program with Participants?) that could have an indicator turned on/off to make this happen? If not, we can continue to discuss the bullets you have outlined.