PooledStreamingEventProcessor - Start fails after Stop invocation
See original GitHub issueHi,
This is a new ticket as #1806 has been closed. I took a look at the implementation (especially at the pull request https://github.com/AxonFramework/AxonFramework/pull/1823) and I think I see two major flaws.
I couldn’t use the 4.5.x-Branch due to some weird compiler issue, but I switched to the tag 4.5.1 and cherry-picked the pull request.
First issue: The AxonAutoConfiguration.configureEventHandling makes a call to builder.workerExecutor(workerExecutor) which in turn sets shutdownWorkerServiceOnStop to false. Therefore only the coordinator service is stopped when I close the Spring context - but not the worker service. So the original issue (that the services are not stopped) remains.
Second issue: It is not possible to reset the PooledStreamingEventProcessor. One would usually do something like the following to reset the processor:
StreamingEventProcessor eventProcessor = eventProcessingConfiguration.eventProcessor( "MyProjector" , StreamingEventProcessor.class).orElseThrow( );
eventProcessor.shutDown( );
eventProcessor.resetTokens( );
eventProcessor.start( );
However, doing this with the applied pull request leads to a RejectedExecutionException, because the coordinator service has been shut down. I encountered the same issue while trying to fix the original issue myself. Stopping the execution services is easy. Restarting them on the other hand…
I would recommend to revert the commit for the moment.
Best regards
Nils
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Hi @smcvb,
With the current snapshot everything seems to work fine. I cannot reproduce the issues. Thank you very much.
Hi Steven,
I can confirm that the first issue does not occur when using the current 4.5.2-Snapshot.
Best regards
Nils