Questions tagged [saga]

A pattern that enables a service bus to deal with long-running processes, fault tolerance and scalability.

Long-running business processes exist in many systems. Whether the steps are automated, manual, or a combination, effective handling of these processes is critical.

NServiceBus employs event-driven architectural principles to bake fault-tolerance and scalability into these processes.

The Saga is a pattern that addresses these challenges uncovered by the relational database community years ago, packaged in NServiceBus for ease of use by developers.

MassTransit supports sagas, and Automatonymous is a saga implementation built on top of MassTransit.

497 questions
0
votes
1 answer

what is a better structure for Redux saga

I have thought about the structure of saga and comed up with an approach, but don't know if it is correct or not. For example, I have multiple saga files, and for each typical saga file, there is one watcher saga watches different actions…
0
votes
0 answers

Is there a way to confirm Events with Automatonymous?

I want to know if there is a way to confirm with Automatonymous, I want the following events to be executed if the previous ones have been completed.
ccassob
  • 335
  • 3
  • 10
0
votes
1 answer

how to test saga yield watcher parallel calls in jest

I want to test my saga i'm able to test individual saga calls but how can i test my watcher saga using jest export default function* saga() { yield [ takeLatest(dataTypeActions.ACTION1, fetchDataType), takeLatest(sourceActions.ACTION2,…
kumar
  • 109
  • 2
  • 13
0
votes
2 answers

How to test assignment lines in saga function using jest

I have a function which consists of saga effect calls i want to coverage the full function with out missing any line of code how can i test if condition here export function* fetchFromSource() { const dataTypeName = mapDataTypes(dataType); Iif…
kumar
  • 109
  • 2
  • 13
0
votes
1 answer

How to make sure that one Saga completes before the other?

I'm a noob in redux-sagas, so please bear with me if I miss out something obvious! I have a scenario wherein I'm using redux-saga to fetch an access_token from an OIDC provider and store it in the browser's localStorage. I also use Sagas to fetch…
Hawkes
  • 457
  • 1
  • 4
  • 16
0
votes
1 answer

UseInMemoryOutbox in Masstransit State Machine, Preserve Order of Publish Messages

I have a MT state machine which is configured with UseInMemoryOutbox() so any messages that are part of the event handling will be published only after the final step in the pipeline is successfully done, which in my case is, state persistence to…
0
votes
2 answers

Implement a simple IFindSaga

I have a simple IFindSaga implemented, I referred and followed the same steps that was provided in particular software document for SQL Persistence Saga Finding Logic. I'm getting an error at session.GetSagaData stating that:…
Leo
  • 136
  • 2
  • 2
  • 11
0
votes
1 answer

redux-saga: tracking multiple async tasks

I am using sagas to track multiple async tasks, but there is one problem I haven't been able to completely solve: function* performTask1() { // Some logic here to takeLatest for the relevant component // check if component id matches? …
Anthony Chung
  • 1,467
  • 2
  • 22
  • 44
0
votes
3 answers

Where to invoke SagaManager in CQRS even handling

Am new to Microservices and CQRS event handling. I am trying to understand with one simple task. In this task I have three REST external services to handle one transaction/request(Service). The three services are step1: customer create. step2:…
0
votes
1 answer

how to add navigator.geolocation.getCurrentPosition in phantomjs+jasmine+requirejs env

I just phantomjs + jasmine + requirejs + saga to test JavaScript codes. I used the way to mock navigator.geolocation.getcurrentposition following 0 in Does phantomJS support geolocations? My JavaScript code looks like this: define(function (require)…
Sunny
  • 1
0
votes
1 answer

Saga scheduling without specifying scheduler address in MassTransit

I am trying to use scheduler in MassTransit state machine saga without specifying the scheduler service address directly. I use UseMessageScheduler in the bus configuration and it works fine since I can do context.Schedule from inside my…
Alexey Zimarev
  • 17,944
  • 2
  • 55
  • 83
0
votes
1 answer

NServiceBus - 2 Classes Using the same Saga, is that possible?

Normally I create 1 class that implements Saga: public class MyClass1 : Saga; { ……… } MySagaData code: [SagaIndex("ExternalCombinedIdentifier")] [SagaIndex("MyOwnId")] public class MySagaData: IContainSagaData { …
Miguel
  • 53
  • 7
0
votes
1 answer

Dealing with "saga not found" scenarios

Are there any mechanisms in Rebus to deal with messages that would normally be handled by a saga but for which there is no current saga that matches the correlation property? Out of the box, I believe those messages are just consumed by Rebus but…
dkr88
  • 504
  • 1
  • 5
  • 15
0
votes
1 answer

Setting initial state of new saga

We are in the process of migrating a legacy system to nservicebus 5.0. What is generally the best way to migrate our business data to saga data? For example, if we had an OrderCancellationPolicy saga, that only allowed cancellation within 2 days,…
Tyler Day
  • 1,690
  • 12
  • 12
0
votes
1 answer

CQRS - business validation rules

I'm creating a system using CQRS and Event Sourcing pattern (I hope so). I have to make a business decision dependent on statistics data stored by one read model and user setting data stored by different read model (both created by events in the…
Dawid Dominiak
  • 497
  • 2
  • 7
  • 11