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
4
votes
1 answer

CQRS: Start process manager by command instead of event

In many examples I see that process managers are started when some event happened. PlaceOrder -> Order Aggregate -> OrderPlaced -> Purchase Process Manager -> ... But is it ok to start process manager by command? Start Process -> Purchase Process…
Teimuraz
  • 8,795
  • 5
  • 35
  • 62
4
votes
1 answer

Rebus Sagas, Revisions and DeferredMessages

I'm trying to configure a Saga that works in the following way: Saga receives a Shipping Order Message. That shipping order has a RouteId property that I can use to correlate Shipping Orders for the same "truck" These shipping orders are created by…
Gerson Dias
  • 77
  • 2
  • 7
4
votes
2 answers

CQRS is saga/process manager the best approach for executing a set of related commands synchronously?

I have a CQRS .NET Core service that currently has a single endpoint for each command. Sometimes a collection of commands makes up a single action in the system (e.g. create an assessment) and 3 or so commands have to be executed synchronously once…
Ben Thomson
  • 1,083
  • 13
  • 29
4
votes
1 answer

Messaging Between Services Events vs Commands

I am trying to understand different methods used in messaging between services. Let us say that I have a scenario where I need first service to notify the other that a user has asked for product creation, and the second service should receive this…
Yahya Hussein
  • 8,767
  • 15
  • 58
  • 114
4
votes
1 answer

Unit testing redux-saga task cancellation

I was wondering if anyone had any tips on how to unit-test the following redux-saga login/logout flow: let pollingTask = null function * handleLogin () { try { const token = yield call(loginHandler) pollingTask = yield fork(handlePolls,…
Hawkes
  • 457
  • 1
  • 4
  • 16
4
votes
0 answers

MassTransit saga states receiving unexpected events

I am using MassTransit.Automatonymous (version 3.3.5 ) to manage a saga and I seem to be receiving unexpected events after a state has transitioned. Here is my state set up: Initially( When(Requested) …
Robert
  • 1,487
  • 1
  • 14
  • 26
4
votes
1 answer

Redux-Saga not able to correctly read response from fetch api

Hi How do I read the data coming back from a fetch call: export function* fetchMessages(channel) { yield put(requestMessages()) const channel_name = channel.payload try { const response = yield…
mtangula
  • 355
  • 1
  • 4
  • 13
4
votes
3 answers

Implementing a Saga/Process Manager in a CQRS http application

Following this example: https://msdn.microsoft.com/en-us/library/jj591569.aspx (Figure 3) How it fits in a http application? The user should perform a http request to the PlaceOrderController, which will send a PlaceOrderCommand, but how would the…
fj123x
  • 6,904
  • 12
  • 46
  • 58
4
votes
3 answers

Aggregate-Root: State Change or fail with Exception or ...?

Aggregate-roots are there to control the state-changes - what is allowed currently and what's not. If the state-transition is allowed, go on. If not, you throw an exception explaining the reason why it was not allowed. But what is if a state-change…
4
votes
2 answers

Declarative Domain Model possible (DDD)?

I'm looking for insight/ papers/ articles, etc. whether a fully declarative Domain Model (as per DDD) is possible. For example: Validation can be declarative (lot's of ORMs do this) business flow logic can be declarative: having a DSL for…
Geert-Jan
  • 18,623
  • 16
  • 75
  • 137
4
votes
1 answer

MassTransit Saga - Errors & Inconsistencies

I've implemented a masstransit saga that works as should, a lot of times. However, there are times when the messages go to the error queue or just seem to disappear. I'm using RabbitMQ. I'd like to know: 1. How do I get the reason/exception message…
Tolu
  • 1,081
  • 1
  • 8
  • 23
4
votes
2 answers

nservicebus concurrent access to saga data

i use NServiceBus as enterprise Service Bus, in the solution i'm developing i have an orchestration service which receives up to 10k messages from all client applications. I would like to improve the architecture performance and consequently enhance…
Riccardo
  • 1,490
  • 2
  • 12
  • 22
4
votes
1 answer

Difference between workflows and sagas

What exactly is the difference between workflows and sagas? What are the pros and cons of each? Thanks!
Ben
  • 2,430
  • 3
  • 22
  • 24
3
votes
1 answer

Is my Saga structure the correct solution? (NServiceBus)

I'll cut straight to it. I'm trying to automate credit card payments via a file sent to our bank. Card payments are not validated with the bank in real time. The bank processes payments overnight and sends out a response file the following day with…
Fellmeister
  • 591
  • 3
  • 24
3
votes
2 answers

What is BPMN User Task equivalent in temporal.io and how to implement it?

I'm evaluating temporal.io as an modern workflow-as-code alternative for BPMN based solutions such as Camunda. In my scenario workflow orchestrates activity workers, which calls external microservices for business transactions. Business transactions…
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225
1 2
3
33 34