I’m using Axon/Server 4.4.3.
In certain cases, I need to send a lot of commands in a short time (roughly 20k in a few seconds).
After sending a certain amount of commands, Axon raised a warning that the command cache would be full and that I should increase axoniq.axonserver.command-cache-capacity (12500 is the default) which I set to 100000 then.
After repeating my case, I now get a new warning:
22-10-2020 09:23:27.134 [grpc-default-executor-16] WARN o.a.c.gateway.DefaultCommandGateway.lambda$onResult$0 - Command ‘com.axxelia.axxalon.app.execution.api
.message.ChangeSchedulingStatusCommand’ resulted in org.axonframework.axonserver.connector.command.AxonServerCommandDispatchException([AXONIQ-4003] Failed to add request to queue
I’m now implementing a pause after sending 1000 commands. It’s clumsy, but let’s see if that helps.
Anyhow: it seems that once the above warnings occur, that the affected commands get lost! Is that right? If so, I think it would be better to raise an Exception that can be catched… so we can handle the problem.
Second question: as the aggregates that are the target for the command all need to receive that specific command - is there a better pattern than to send 1000’s of single commands?