Spring state machine - deferred events are not handled (under load)

33 Views Asked by At

We are using Spring State Machine and there are some state that we have defined deferred events for

In normal running of the program everything is OK and the deferred events are activated when the "target" state was reached

enter image description here

In the above example event 3 is deferred in state S2 meaning that if event 3 has arrived when the state machine is in state S2 it will be added to the deferred events list and will be handled automatically after event 2 has arrived and transitioned the state machine to state S3

This is how we define the deferred event

  .state("S2","Event3")

In our situation when the system is under load and there are thousands of transitions we face the situation that even if Event2 has arrived and the state was moved to "S3" , the deferred event "Event3" is not handled

On additional note is that the transitions from S2 to S3 may also be done by using "TimerOnce" functionality

Thanks

0

There are 0 best solutions below