Hi Allard,
The issue is resolved now, i was having the axon 2.0.5 in my class path. Thanks for pointing that out.
Now i am facing another issue:
The saga event handlers are not getting called when i am firing few request one after another (60 requests) using the disruptor command bus with both async and non-async saga.
I could see the event handler getting called only for 8-10 requests out of 60 requests in both cases.
a) Async saga having pool size as 10 and processor count as 10.
I am getting the following error:
Name: myThreadPool-8
State: WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@30178442
Total blocked: 3 Total waited: 576,356
Stack trace:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
org.axonframework.saga.annotation.AsyncSagaCreationElector.waitForSagaCreationVote(AsyncSagaCreationElector.java:60)
org.axonframework.saga.annotation.AsyncSagaProcessingEvent.waitForSagaCreationVote(AsyncSagaProcessingEvent.java:89)
org.axonframework.saga.annotation.AsyncSagaEventProcessor.onEvent(AsyncSagaEventProcessor.java:103)
org.axonframework.saga.annotation.AsyncSagaEventProcessor.onEvent(AsyncSagaEventProcessor.java:43)
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:113)
org.axonframework.saga.annotation.AsyncAnnotatedSagaManager$StartDetectingRunnable.run(AsyncAnnotatedSagaManager.java:409)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:724)
b) Non async saga:
The request is going to the command handler and not to the saga event handlers. Only few saga event handlers are getting called and in some called saga event handlers the scheduled events are not getting triggered. I could not see any quartz related error/deadlocks on my console.
- What would be the best approach to handle bulk requests (JMS queues) and also to maintain the saga conversation? (
Our requirement is to process each request(JMS Queue ) as it comes and store the aggregate in event store and start the saga and based on second request close the saga, all these requests comes with in milli second gap(with 2k tps), we need to process all these request, we also need to schedule timeouts wait for dependent request )
Could you please provide your comments on above points?
Cheers,
Prashant