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.

Allow assigning multiple sagas to a single event processor

See original GitHub issue

The current way of creating event processors for Sagas, as I’m seeing it, is to create a single tracking event processor for a single Saga. This works quite well on a microservice scale, but might turn out to be a problem in big monolithic applications which may implement a lot of Sagas. Since I’m writing such application, I want to have a better control over number of existing threads, which in turn will give me better control over usage of database connection pool (I’m using tracking event processors with JPA token store), context switching and memory usage.

Ideally, I would like to have at most as many tracking event processors as CPU cores where each event processor executes multiple sagas.

As stated by answer to this SO question, such configuration is currently not possible. The reason being that event processor creation logic is currently hardcoded into SagaConfiguration for both subscribing and tracking event processors.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
smcvbcommented, Jun 7, 2018

@mjagus as you might have been notified of, this feature is now contained in the framework. As off release 3.3 you should be able to configure a single Event Processor for several Event Handling Components (like Sagas for example).

0reactions
smcvbcommented, Mar 13, 2018

Thanks for elaborating, understanding your point of view, which doesn’t sound like a weird request. We’ll discus this further here and update this issue for any progress around the decision making of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementation - Axon Reference Guide
In Axon, sagas are classes that define one or more @SagaEventHandler methods. Unlike regular event handlers, multiple instances of a saga may exist...
Read more >
Multiple sagas (of same type) across different JVM using Axon
1 Answer 1 ... A Saga in Axon terms is nothing more than a specific type of Event Handler. As such, Axon will...
Read more >
Defining Sagas using the Saga State Machine
Sagas are one of the more powerful features in MassTransit, allowing complex state and behavior to be defined using a fluent syntax.
Read more >
API Reference - Redux-Saga
sagaMonitor : SagaMonitor - If a Saga Monitor is provided, the middleware will deliver monitoring events to the monitor. onError: (error: Error, {...
Read more >
On order of event handlers - Google Groups
We sometimes have multiple event handlers listen to the same event, both synchronous processors. With one event handler updating state in the DB, ......
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