question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PooledStreamingEventProcessor - Start fails after Stop invocation

See original GitHub issue

Hi,

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:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
nils-christiancommented, Jun 10, 2021

Hi @smcvb,

With the current snapshot everything seems to work fine. I cannot reproduce the issues. Thank you very much.

1reaction
nils-christiancommented, Jun 7, 2021

Hi Steven,

I can confirm that the first issue does not occur when using the current 4.5.2-Snapshot.

Best regards

Nils

Read more comments on GitHub >

github_iconTop Results From Across the Web

PooledStreamingEventProcessor (Axon Framework 4.5.15 API)
Instruct the processor to split the segment with given segmentId into two segments, allowing an additional process to start processing events from it....
Read more >
Axon - stuck in 1 event after error occurred - Stack Overflow
First of these is the ListenerInvocationErrorHandler . This error handler is invoked for any exception thrown from within your @EventHandler ...
Read more >
Spring Boot @SpringBootApplication, SpringApplication Class
Now we have to create a java class with main method, mark it with @SpringBootApplication annotation and invoke SpringApplication.run() method.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found