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
3
votes
2 answers

Saga that depend on events from the past

I have a question how to deal with a saga where the decision making depends on an event that was published before the saga was created. Here is an example to illustrate my issue: Imagine I have a CustomerAR and a OrderAR. When the customerAR…
llMll
  • 495
  • 4
  • 9
3
votes
1 answer

Redux saga. How to put action using addEventListener?

How to put action using addEventListener? Here is example: https://codesandbox.io/s/redux-toolkit-state-new-array-forked-t84l9?file=/src/redux/sagas/sagas.js function* someFunc() { // yield put(action) } addEventListener('event', *---what's this…
HackerMF
  • 475
  • 7
  • 18
3
votes
1 answer

Choreography Sagas in DDD - Chain of Integration Events?

I'm currently studying Saga pattern. Most examples seem to focus on Orchestration Sagas where we have one central saga execution coordinator service that dispatches and receives messages/events. Unfortunately information on how to implement…
OverflowStack
  • 825
  • 1
  • 14
  • 30
3
votes
0 answers

Use async await in react component with redux-saga

Im working on a new RN application. In my sign in component, I have the following code. const SignIn = ({ email, password, signInError, navigation, signInStart }: IProps) => { const handleLogin = async () => { const data = { email, password…
Shashika Virajh
  • 8,497
  • 17
  • 59
  • 103
3
votes
1 answer

React native saga yield call is not working

I am trying to write an api by using redux-saga. I have my servicesSaga.js like this import { FETCH_USER } from '../actions/actionTypes' import { delay } from 'redux-saga' import { call, put, takeEvery, takeLatest } from 'redux-saga/effects' import…
almtl
  • 95
  • 5
3
votes
1 answer

How to replay/project events in Axon4 towards a different context?

I'm building my first event sourced system. It will have multiple domains using projects with a publication lifecycle at it's core. How can I effectively replay or re-apply events of two domains to a new aggregate inside a third domain? To be more…
Martin
  • 33
  • 3
3
votes
1 answer

Axon Framework - How can i rollback a Saga process

I am using the Axon Framework without the Axon Server with spring-boot auto config. My question is: If i am running a saga process as you can see below, and in the middle in processing i run out of disk, there will be an exception, and i have to…
polosoft
  • 200
  • 1
  • 14
3
votes
0 answers

How to get multiple Masstransit state machine instances to process correct message

I am using MassTransitStateMachine example based of from https://github.com/MassTransit/Sample-ShoppingWeb. Everything works fine if I have only one application of state machine running. But when I have more than one instance of state machine…
Wit B
  • 53
  • 1
  • 5
3
votes
0 answers

Masstransit saga with exceptions

I want to use masstransit saga in my .net core project but I could not find any documentations or (best practice)examples to handling exception. If I have an error in my consumer,should I publish some failed event and consume that. Actually I don't…
Caglayan.
  • 31
  • 1
  • 5
3
votes
0 answers

React-Native fetch() equals false before first yield call()

The issue: I want to add stanza.io to my react-native project. After some research, I followed this to install stanza.io. It seems to work pretty well but a problem occurs even before reaching my new stanza-code : I have a saga from redux-saga whose…
3
votes
2 answers

Yield call returns a promise

So I am trying to learn react-redux-saga. I am building a simple application that just grabs user data from an API and displays it. Here is my generator function in my saga: export function* fetchImage() { try { const response =…
MatTaNg
  • 923
  • 8
  • 23
  • 41
3
votes
1 answer

redux-saga: retry catched actions after token refresh

I have, a set of action grouped in redux-saga channel. Each of them (or many simultaneously) can fail because of token expiration. How can I suspend future actions to prevent next failures, retry already catched action after token refresh and…
Szopinski
  • 790
  • 1
  • 10
  • 18
3
votes
1 answer

NServiceBus saga design issue

I am encountering an "optimistic concurrency violation" exception when using NServiceBus saga. My saga covers a relatively simple flow: when any message arrives it makes few external requests and after some time gathers replies. Below you can find…
alex.dev
  • 170
  • 11
3
votes
1 answer

How do I execute a routing slip from a saga?

We are using a saga to model a workflow. This workflow waits for events to come in and perform some work based on the events. In some cases, we need to perform multiple tasks (chained .Then methods) one after the other but if one fails we want to…
sduplooy
  • 14,340
  • 9
  • 41
  • 60
3
votes
2 answers

Saga call inside map not working

Spent few hours trying to figure out how to run sagas inside a map in parallel. Tried out what I found : yield result.map(item => call(api.endpoint, item)) But nothing seems to happen. Here's what I was doing : export function*…
Anil Krishnan
  • 31
  • 1
  • 2