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

Single NServiceBus message handled by Saga two times

I have a NServiceBus version 3.3.8 Saga that I am working on migrating from NServiceBus 2.6. After I upgraded it, I have found that a single message in the queue is getting processed twice by the saga. What is most strange about it is that…
Steve Bering
  • 121
  • 2
  • 7
2
votes
2 answers

How to ensure good performance with a MassTransit Saga that adds an item to an NHibernate-persisted IList

I have a saga that has 3 states - public static State Initial { get; set; } public static State ReceivingRows { get; set; } public static State Completed { get; set; } It transitions from Initial to ReceivingRows when it gets a…
Bryan Edds
  • 1,696
  • 12
  • 28
2
votes
1 answer

How to map an IDictionary with Fluent NHibernate's class mapping, and test that mapping?

My MassTransit saga has only one field that will not map correctly. It is - public virtual IDictionary Rows { get { return _rows; } set { _rows = value; } } I've tried mapping it a couple ways - …
Bryan Edds
  • 1,696
  • 12
  • 28
2
votes
1 answer

Nservicebus Sagas and Subscribing to Events

In NServiceBus 3.0.3 I have written a saga. Based on what I'm seeing in the CQRS paradigm, when we see past tense, that should coincide with an event. I want to make sure I don't have business logic in my saga. My assumption in building the saga…
1
vote
2 answers

How to write handler for Error queues in NServiceBus Saga?

I have a situation where the Maxtries in my MSMQ is 5. After 5 times nservicebus sends the message to the Error que that I have defined. Now I want to perfomr some further action when this happens (I have to update status of some processes to…
user993104
  • 11
  • 1
1
vote
1 answer

Saga completion causes Distributed Transaction Completed Error

Process order: Saga message handler receives first message containing data items. Message handler uses business objects that has it's own database transaction. If items are updated OK, database transaction commits and saga completes. Saga message…
Fellmeister
  • 591
  • 3
  • 24
1
vote
2 answers

StackOverflowException caused by Bus.Publish() or subscription?

I have an agent that employs a saga to track incoming messages of a given type until a Timeout message is received. In the Timeout handler, I have the following: public override void Timeout(object state) { // If Data.IsNull: Do…
Fellmeister
  • 591
  • 3
  • 24
1
vote
1 answer

How is saga design pattern different from pub sub model in micro service architecture?

In saga one component calls another using a topic in between ,same thing happens in pub shub model .Then how both are different ?
1
vote
1 answer

Waiting for reponse from MassTransit Saga state machine

The MassTransit documentation for Saga State Machines (Respond section)(https://masstransit.io/documentation/patterns/saga/state-machine) mentions that it's possible to initiate a state machine instance and then wait until that instance finalises…
u05sdb
  • 35
  • 5
1
vote
1 answer

SAGA Pattern in a macro-services Spring Boot Web application

I'm trying to understand what could be the best solution to manage a Web application in Spring Boot made of "Macro-services" and if the SAGA Pattern (Orchestrator) can be adequate in this context with or without the use of an Event Bus . I try to…
HK15
  • 47
  • 9
1
vote
1 answer

Applying SAGA pattern in situations where immediate feedback to user is required

Imagine there is an app where a user has a wallet which they can top it up with cash, cash it out or make purchases from an external system, when the user creates a new purchase order, we first deduct the amount from the user’s wallet. Then send an…
1
vote
1 answer

How to handle in Saga pattern implemented with execution coordinator, if a service completes its transaction, but does notify the next service

Consider order processing which consists of multiple micro-services each for: Create order. Make payment. Update inventory. Deliver order. Let say saga execution coordinator is used to implement saga, where each of above is in own micro-service…
ankit
  • 35
  • 1
  • 8
1
vote
1 answer

How to implement a Saga on Topos?

Topos it .NET Event Processing library, similar to Rebus. Unlike Rebus, it is not so much for messages, as for event processing. Rebus supports Sagas out of the "box", including in terms of persistence, correlation and concurrency. How to implement…
Mentor
  • 3,058
  • 1
  • 22
  • 27
1
vote
1 answer

Masstransit Courier Activity problem to catch exception and trigger Compensate

i am trying to work with masstransit courier routing slip. i have fulfill consumer that activates are added as public class FullFillHerdGroupEditConsumer : IConsumer { public async Task…
Rouzbeh Zarandi
  • 1,047
  • 2
  • 16
  • 34
1
vote
0 answers

Saga: Difference Orechestrator & (Saga Execution Controller)Choreography

I am currently struggling to see the difference in implementing the Saga pattern: From theory, I understand the difference between orchestration and choreography. Looking at implementations of choreography, I find the usage of a 'Saga Execution…
G.R
  • 65
  • 6