我有一个带有 n 个消息侦听器的事件队列。当消息到达时,一个消息侦听器接收它并执行状态机的一个新实例。我面临的问题是,虽然多条消息是并行处理的,但状态机开始按顺序执行动作,尽管它们是由不同的状态机实例调用的,如下所示:
2017-10-18 16:11:03.740 INFO 30282 --- [lTaskExecutor-1] o.s.s.support.LifecycleObjectSupport : started org.springframework.statemachine.support.DefaultStateMachineExecutor@6ddb1ea6
2017-10-18 16:11:03.741 INFO 30282 --- [lTaskExecutor-1] o.s.s.support.LifecycleObjectSupport : started EVALUATE_IS_WALKTHROUGH SAVE END START / START / uuid=b922b6b1-a441-4924-8531-d45e0e0c9c40 / id=null
2017-10-18 16:11:03.740 INFO 30282 --- [TaskExecutor-10] o.s.s.support.LifecycleObjectSupport : started org.springframework.statemachine.support.DefaultStateMachineExecutor@13b6ace4
2017-10-18 16:11:03.741 INFO 30282 --- [TaskExecutor-10] o.s.s.support.LifecycleObjectSupport : started EVALUATE_IS_WALKTHROUGH SAVE END START / START / uuid=e06a8c1d-beed-41c6-bc63-d8c1a3a56169 / id=null
2017-10-18 16:11:03.759 INFO 30282 --- [pool-5-thread-1] i.b.b.e.processors.actions.SaveAction : [io.botbit.backend.events.processors.actions.SaveAction@607e4071] Saving event Event[id=null,
2017-10-18 16:11:24.046 INFO 30282 --- [pool-5-thread-1] i.b.b.e.processors.actions.SaveAction …Run Code Online (Sandbox Code Playgroud)