Hi
we have a requirement to process multiple commands for a single transaction request, given below are the steps to process a transaction.
-
Register a transaction
-
A Saga starts upon listening to registration completed event.
-
Publish 100k TestCommands from Saga service(S) to a client service(A) developed using Axon framework 4.5 and spring boot, each command will create an Event sourced aggregate an result in TestCommandExecutedEvent.
-
A pagecompletedevent will be published upon listening to every 5k TestCommandExecutedEvent events in a event handler service(B).
-
100k commands are executed in batches. 5k commands will be triggerred upon listening to a pagecompletedevent in saga.
We are using a single context with one axonserver node ( Axon server 4.5 ).
We have configured below properties in the respective services
Saga Service (S) and Client service (A):
axon:
axonserver:
initial-nr-of-permits: 10000
nr-of-new-permits: 5000
new-permits-threshold: 5000
command-flow-control:
initial-nr-of-permits: 10000
nr-of-new-permits: 5000
new-permits-threshold: 5000
Event handler service(B):
axon:
axonserver:
initial-nr-of-permits: 10000
nr-of-new-permits: 5000
new-permits-threshold: 5000
eventhandling:
Test:
mode: tracking
batchSize: 100
threadCount: 4
When we post a single transaction request, end to end flow completes faster. But when we post two parallel transactions, we observed that the end to end time getting doubled for both transactions.
Please let us know if the same configuration to be done at axon server as well and also if any other configuration that will help with our requirement.