Questions tagged [nservicebus-sagas]

Out of the box support for long running processes in NServiceBus

NServiceBus Sagas is a mechanism for allowing the modelling and runtime execution of long running business processes.

64 questions
1
vote
1 answer

Correlating an NServiceBus Saga with ConversationId

I currently have a some sagas that pass around a custom CorrelationId on a base message class. All events and commands inherit from that base class and so have easy access to the CorrelationId. As a result, the ConfigureHowToFindSaga mappings look…
jonho
  • 1,680
  • 2
  • 19
  • 29
1
vote
1 answer

What transactions are used in NServiceBus Sagas?

I'm using Azure Table storage for persistence and Azure Service Bus for transport and I would like to know what transactions are in place within a saga's handler? Is it the same as a normal handler? I'm asking because I'm seeing database changes…
Carl
  • 1,782
  • 17
  • 24
1
vote
1 answer

Using a NServicebus saga to serialize execution of long-running endpoint handlers

We're am trying to serialize processing of a list of business objects using a Saga. Right now, without a Saga, we simply loop through a list of objects, and fire off a bus.Send(new ProcessBusinessObejct(obj)) async to have handlers execute. So the…
John
  • 3,591
  • 8
  • 44
  • 72
1
vote
1 answer

NServiceBus.Persistence.Sql.MSBuild does not create saga sql scripts from referenced assemblies

I have a solution where my Sagas and hosting are defined in two seperate projects: Project NSB => Defines class CreateAuthoritySetSaga : SqlSaga<...> Project Webhost => References project NSB Webhost assemblyfile defines the PromotionSqlScript…
Carsten Gehling
  • 1,218
  • 1
  • 13
  • 31
1
vote
2 answers

How to use sagas in a CQRS architecture using DDD?

I am designing a CQRS application using DDD, and am wondering how to implement the following scenario: a Participant aggregate can be referenced by multiple ParticipantEntry aggregates an AddParticipantInfoCommand is issued to the Command side,…
Cpt Slow
  • 370
  • 3
  • 18
1
vote
1 answer

nservicebus db insert duplicate

We have a Data loader service that uses NServiceBus to insert data(if not already present)into SQL DB. The queue is configured with Concurrencylevel > 1 as the data to load might get huge. Since the Concurrencylevel > 1, it results in duplicate…
KJE
  • 11
  • 2
1
vote
1 answer

How to correctly correlate a controller saga which starts multiple instances of another controller saga?

I have a controller saga which used to have a step starting a process containing 3 actions in one transaction. I am now in the process of refactoring this sub-process into a separate saga. The result of this will be that the original saga will start…
sp1nakr
  • 378
  • 2
  • 12
1
vote
3 answers

How to design a NServiceBus Saga started by receipt of multiple messages

I am trying to find help on designing a Saga in NServiceBus 5.x that is started by 2 or more messages. This means that the saga will not start with a single message, but all messages must be present before the saga starts. I don't quite understand…
John
  • 3,591
  • 8
  • 44
  • 72
1
vote
1 answer

SecondaryIndexPersister on Azure is throwing exception when saga is started with the same key as historically completed saga

We use Sagas with Azure Persistance. We have a saga which can be compared with a user session handler. The unique key for that session is the mobile number of the user. The first time a text message is received a saga is created for that mobile…
1
vote
1 answer

Prototype project with RabbitMQ+RavenDB repeated SharedQueue closed errors from RabbitMQ

I've created a simple saga prototype project with RabbitMQ as the transport and RavenDB as the persistence mechanism. The prototype actually runs as expected, but every few seconds i get this error msg: ERROR…
Amy
  • 11
  • 1
1
vote
1 answer

Nservicebus saga timeout

I have a saga which checks on the status of an API calls every 30 seconds if the status returned back from the call is successful the saga is ended, if not the saga waits 30 seconds and attempts again. If the API call has not returned a successful…
level_zebra
  • 1,503
  • 6
  • 25
  • 44
1
vote
2 answers

Dependency injection for NServiceBus Saga unit testing

My question is similar to question about DI for NserviceBus Handler for testing (Handler). As a solution, you can use constructor injection by using the following syntax: Test.Handler(bus => new YourMessageHandler(dep1, dep2)) I…
1
vote
1 answer

Adding Complex Type to Saga Data

I'm attempting to create a Saga with SagaData that contains a complex type. For example: public class MySagaData : IContainSagaData { public virtual Guid Id { get; set; } public virtual string Originator { get; set; } public virtual…
Justin Self
  • 6,137
  • 3
  • 33
  • 48
1
vote
1 answer

In ServiceMatrix, is it possible to 'ConvertToSaga' an endpoint which publishes/subscribes event messages rather than command messages?

I've got a solution with 4 NSB host endpoints which were created using ServiceMatrix and I want to use them within a saga. I know how to Convert To Saga from a command and that works fine in a test project. What I don't understand is how I can do…
Justin
  • 501
  • 5
  • 13
1
vote
2 answers

How to make Saga message Handle wait for another Handle to complete in NService Bus

We recently started implementing Nservice bus in our project. We are new to Saga Service and we are struck with the below scenario. Assume like, we have 4 steps in our saga and saga will be started by message1. Message 2 will be triggered by some…
Venkat
  • 853
  • 10
  • 26