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.

Saga handler not executed if Event Handling Component and Saga have identical Processing Group specified

See original GitHub issue

In order to be able to use Saga with axon-kafka I have set the following configuration

public class MySagaConfig {

  @Bean
  public SagaStore mySagaStore() {
    return new InMemorySagaStore(); //JdbcSagaStore, InMemorySagaStore, JpaSagaStore and MongoSagaStore.
  }

  @Bean
  public SagaConfiguration<MySaga> mySagaConfiguration(@Autowired KafkaMessageSource<String, Object> kafkaMessageSource) {
    return SagaConfiguration.trackingSagaManager(MySaga.class, "MyProcessor", configuration -> kafkaMessageSource);
  }
}

You can find the full example here https://github.com/marinkobabic/axon-kafka-example/

It seems if there is already a processor “MyProcessor” registered using the SimpleMethodInvoker then the MultiEventHandlerInvoker is not anymore used. When I remove the processor name in the code above for the Saga and define a different name in the annotation of the Saga “MyProcessor2”, then the methods are called. I have done this hack just to see if there is any difference, but I think Kafka is not supporting multiple processors. When the hack is used then the normal event handler are not executed anymore.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marinkobabiccommented, Sep 3, 2018

I will do a test and let you know. I have seen once this exception

java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access

Hope you have a new KafkaConsumer instance per Trackingprocessor.

On Mon, Sep 3, 2018, 12:47 Steven van Beelen notifications@github.com wrote:

Axon Kafka shouldn’t make a difference in this scenario! As long as you configure both your Processing Groups to have Kafka as the message source, you should be good.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AxonFramework/AxonFramework/issues/734#issuecomment-418077275, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHSOBiMkXgt2LOpoyKMNg9tUGj2p59-ks5uXQjVgaJpZM4WOoSx .

0reactions
smcvbcommented, Oct 17, 2018

Closing this issue in assumption that #750 has resolved the problem. This is part of 3.3.6. If you’ve got time checking it out @marinkobabic, that would be nice! If issues still arise, then we very likely will reopen this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event Processors - Axon Reference Guide
First, an event handler is positioned in a Processing Group. Each event handler, or "Event Handling Component," will only ever belong to a...
Read more >
Saga concurrency • NServiceBus • Particular Docs
When using some persisters, messages received simultaneously that correlate to the same existing saga instance are not handled simultaneously.
Read more >
Persistence of execution information in Axon Saga
1 Answer 1 ... Based on my understanding, I think you are somehow misusing the Saga component from Axon Framework. I assume from...
Read more >
How to handle typical event-driven architecture failures
Types of errors. An event-driven system has at least three pieces: the components that send requests, components that receive and process them ( ......
Read more >
Handling Middleware With Redux-Saga - Telerik
This includes managing the present state, sharing data between components and trying not to repeat the process of fetching the same data twice....
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