Questions tagged [automatonymous]
Automatonymous is a free, open-source state machine library for .NET.
75
questions
1
vote
0
answers
75
views
How to test that a message was ignored by a MassTransit state machine?
I'm developing an application in C# using MassTransit's saga state machine feature, and I'm trying to write unit tests (NUnit) for my saga to assert that certain events are ignored in certain states.
...
0
votes
1
answer
195
views
MassTransit StateMachine Saga - running behind LoadBalncer, How to stop consuming the same published message more than once
In MassTransit Send and RequestClient will be mapped to exchange or queue, That will be handled by LoadBalanced Consumer.
But for Publish Message, It will be consumed by all the instances that are ...
0
votes
1
answer
54
views
Throw UnhandledEventException if the event is filtered
I've a scenario where a certain filter has to be matched before we can transition into a new state. So i've setup a filter, and registerd OnUnhandledEvent to throw exceptions if the event isn't ...
0
votes
1
answer
66
views
How to setup "Enable Express" of ServiceBus in MassTransit
Is there any way to control "Enable express" option of Azure ServiceBus in MassTransit?
I've found other options like "Enable Partitioning", "Enable Batched Operations" ...
0
votes
1
answer
228
views
How to avoid persisting a temporary conditional variable when MassTransit Automatonymous is using Entity Framework
I am using Mass Transit's FSM Automatonymous package to persist the saga state into a database via Entity Framework integration, so I have a saga class mapped to a DB table containing correlation ID, ...
0
votes
1
answer
103
views
How to pass properties via CompositeEvent
I've got some events in state machine
public Event<FirstCompletedEvent>? FirstCompletedEvent { get; set; }
public record FirstCompletedEvent(Guid PaymentKey, string PaymentDetails) : ...
1
vote
1
answer
577
views
Parallelism with MassTransit saga and compensation
I have some queries since I am new to the MassTransit saga.
Queries:
Is it feasible to introduce parallelism with MassTransit saga?
If so what is the proper way?
If so what about the compensation ...
0
votes
1
answer
143
views
When using Automatonymous Statemachine and EF Core to store the state can I combine the state and my entities in one DbContext
I was wondering what the best practices are surrounding using EF Core, the saga state Db and your application DB, and whether you should or should not combine your saga state with your entity in the ...
1
vote
1
answer
364
views
Composite event is not triggered in MassTransit
My problem that Composite Event isn't not triggered when I got all the required events (in my case LinkContract, LinkCustomer). And there is a strange thing - when I send LinkContract event, value of ...
0
votes
1
answer
1k
views
MassTransit "The Completed event is not handled during the Final state for the RequestStateMachine state machine" error
I have a system where I try to implement a middleware for our APIs to have idempotency handled. for this all of the APIs send a message to system where another service takes these messages and either ...
0
votes
1
answer
214
views
How can you mock an Automatonymous Activity?
I'm trying to unit test my state machine and that it transitions to the states I expect when certain events are received. To do this I'm using the InMemoryTestHarness which enables me to create my ...
0
votes
1
answer
865
views
MassTransit Automatonymous - State not changing when a message is Sent
I am trying to figure why "Sending" a message does not invoke state machine, but if I "Publish" a message, it works and I can see the state changing.
Following is my code, it is ...
0
votes
1
answer
426
views
Can I use MassTransit/Automatonymous saga without using entire MassTransit framework?
I am looking for best .Net Saga framework. Automatonymous looks promising, but all samples and docs are related to it's parent MassTransit project.
Is it possible to use Automatonymous based saga ...
1
vote
1
answer
1k
views
Automatonymous StateMachine how to handle NotAcceptedStateMachineException
Is there any way to handle NotAcceptedStateMachineException in generic way e.g. return to client some user friendly message in request-response approach?
Automatonymous....
1
vote
1
answer
134
views
Registering a MassTransit SagaStateMachine with RedisRepository in SimpleInjector - Multiple Constructors
I am able to register a MassTranst SagaStateMachine in a SimpleInjector container using the InMemoryRepository:
container.AddMassTransit(cfg =>
{
// Unrelated registration code ommitted
// ....
1
vote
1
answer
461
views
Start State Machine in specific state while testing
I am trying to create unit tests for my state machine to check if each state does what it is supposed to do.
I can bring the state machine into any state by publishing the event that starts the state ...
1
vote
2
answers
1k
views
Skip a Mass Transit state in an if-else clause
I am trying to make a state machine that should send an email if my action ends with an OK status OR it should repeat the action at least n-times until it ends with an OK status. If the n-times ...
1
vote
1
answer
518
views
Automatonymous - Payload not found when calling RaiseEvent with Send Activity
I've been spinning my wheels trying to get the MassTransitStateMachine working and I seem to not understand exactly how this is supposed to work.
The error I'm receiving (full code below) is ...
2
votes
0
answers
664
views
How to publish an event in Automatonymous state machine after each event gets completed?
I have an Automatonymous state machine with a bunch of events.
I would like to publish each event after the previous one completes. I know I could publish it in the consumer of each event, but some of ...
1
vote
2
answers
1k
views
Testing a MassTransit saga with scheduled events
Trying to follow the example on how to test a Saga that uses DI (https://masstransit-project.com/usage/testing.html#testing-using-dependency-injection)
var provider = new ServiceCollection()
....
0
votes
1
answer
324
views
Log handled MassTransit Saga exception
I'm trying to figure out how to log handled exceptions. Currently the exception thrown from an Activity will be swallowed (for example if there are DI errors when trying to create the Acitivity).
What ...
0
votes
1
answer
1k
views
Test MassTransit state machine saga activity
I'm trying to do unit tests on a custom Activity that I have for my MassTransit state machine saga.
It looks something like this:
public class UpdateActivity : Activity<UpdateState>
{
...
0
votes
1
answer
226
views
Abort chain of activities for MassTransit Saga
I'm trying to figure out how to abort a chain of activities, if one activity decides that there is something wrong, and the Saga should be Finalized.
For example:
Initially(
When(UpdateRequested)
...
0
votes
1
answer
419
views
Restart a MassTransit Saga
In my application, user can trigger updates for a specific resource. When that happens, an UpdateInitiated event is sent.
A MassTransit Saga is initiated based on that event, and it triggers a series ...
3
votes
1
answer
976
views
How to monitor MassTransit Courier routing slip properly?
I managed to implement MassTransit Courier routing slip with bunch of activities. I decided to add a state machine to monitor it, so I created separate events and states and used EF Core as a storage ...
2
votes
1
answer
1k
views
How to configure EF Core persistence in MassTransit and Automatonymous?
I am trying to configure Automatonymous worker implementation with EF Core as persistence. I publish event via api and process it in hosted service using RabbitMq as a transport. Unfortunately ...
1
vote
1
answer
362
views
Need StateMachine's Activity examples
I'm learning MassTransit's StateMachine, it's helpful in my usecase, really like it, now I would like to learn more about how to use Activity properly but it's hard to find document/examples, please ...
4
votes
1
answer
2k
views
Consumer saga vs Automatonymous in MassTransit
What exactly is a consumer saga, and how is it different from Automatonymous? I know that Automatonymous is a separate library that is used by MassTransit.
0
votes
1
answer
723
views
Multiple State machines with automatonymous using EFCore persistence not working
We are using Masstransit with automatonymous and InMemoryRepository for saga persistence. We have around 3 state machines configured and working perfectly. We recently changed from InMemoryRepository ...
0
votes
2
answers
497
views
State machine inconsistency while using Automatonymous
I am new to microservices and using masstransit with automatonymous. Currently my state machine is showing inconsistency while execution. The code inside Initially works as expected but the control ...
0
votes
0
answers
37
views
When/how is a consumer saga completed? [duplicate]
The MassTransit documentation on sagas describes how
By default, instances are not removed from the saga repository.
It goes on to describe how a saga may be marked for removal from the saga ...
0
votes
1
answer
2k
views
Dependency Injection problem with Masstransit Sagas and Custom Activities
I am implementing a Saga for a distributed system. So far I haven't got any problem using Masstransit documentation to implement a Saga without any meaningful behavior (just an orchestrator with a ...
0
votes
0
answers
682
views
Masstransit Automatonymous :Discarding events on missing sagas instances going to error queue
Automatonymous using Redis : Same event is used by multiple state machines Sagas.When the event is published (Fan out), The sagas which are not expecting the event and using x.OnMissingInstance(x=>x....
0
votes
2
answers
3k
views
.Net-Core 2.2 MassTransit.ConfigurationException: The state machine was not properly configured
Newbie question - what am I missing? Are there any dotnetcore 2.2 Saga examples available?
I have a basic end to end system working OK with messages flowing across containers in docker-compose, but ...
2
votes
1
answer
673
views
How to persist Saga instances using storage engines and avoid race condition
I tried persisting Saga Instances using RedisSagaRepository; I wanted to run Saga in load balancing setup, so I cannot use InMemorySagaRepository.
However, after I switched, I noticed that some of the ...
3
votes
0
answers
3k
views
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 ...
0
votes
1
answer
269
views
Reprocess specific masstransit message in a new saga and finalize current
I'm using Masstransit 5.1.4 with sagas. I have a saga where I want to implement the following behaviour:
When a StartMsg is received -> transition to Active state
While in Active state, several ...
2
votes
2
answers
3k
views
How to properly setup activities in a Masstransit statemachine saga?
I've been fighting a lot with this problem for a couple of days, but cannot find a way that actually works.
My scenario is that I have a state machine saga where I want to do stuff in the same ...
1
vote
1
answer
3k
views
Azure Container Instance apparently keeps running after Stop or Delete
We have a microservice based app that uses Azure ServiceBus.
We deploy one of the services (a saga manager) as a .Net Core console app in a docker container (Linux). We use docker-compose and a group ...
3
votes
0
answers
1k
views
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 ...
1
vote
0
answers
592
views
MassTransit saga azure service bus receive endpoint setup?
I am trying to configure MassTransit to work with Automatonymous State Machine using the Azure Service Bus and i cannot see any working examples on how to do this. We previously was using RabbitMQ ...
1
vote
1
answer
1k
views
Using saga event to react to a a message published in a consumer
I'm putting together a proof of concept using Mass Transit with RabbitMq and Automatonymous in
an asp.net core 2.1 application. I'm using EntityFramework core with Postgres for
persistence.
What I'm ...
2
votes
2
answers
916
views
Azure Service Bus - MessageLockLostException when app is in Docker container, works fine otherwise
We have a .NET Core console app that serves the role of a Saga/Process manager.
This Saga app communicates with other microservices via Azure Service Bus (with the use of MassTransit for messaging ...
0
votes
1
answer
732
views
How to trigger the execution of the compensation flow for the activities used within an Automatonymous state machine?
My activities throw exceptions from time to time during the execution, so I've implemented the Faulted methods of Activity<TInstance> to handle that, discarding the changes made in the Execute ...
1
vote
2
answers
1k
views
Getting ConsumeContext not available when using MassTransit and Automatonymous Publish after previously using RaiseEvent
If we set up a Saga and immediately Publish(context => ...) then a message successfully hits the bus.
If however, we have something like
Initially(
When(SomeCommand)
.Then(context => { ...
0
votes
2
answers
783
views
MassTransit saga with Redis persistence gives Method Accpet does not have an implementation exception
I'm trying to add Redis persistence to my saga which is managing calls to a routing slip (as well as additional messages to other consumers depending on the result of the routing slip) in the hopes ...
0
votes
0
answers
223
views
MassTransit Saga, Is there possibility of losing events when using UseInMemoryOutbox?
In a masstransit saga when UseInMemoryOutbox is enabled, Is there possibility of losing events?
As far as I understand UseInMemoryOutbox, It will postpone publishing events after persisting saga, So ...
4
votes
2
answers
3k
views
MassTransit saga/statemachine not returning the request response to the controller
I feel like I'm so close to getting this working but can't seem to get it over the line...
I have a .NET Core ASP application with saga/state machine that seems to work well for the most part. It:
...
1
vote
1
answer
421
views
MassTransit Middleware: OnMissingInstance equivalent for Saga without Automatonymous
I'm attempting to hand crank a Saga without using an Automatonymous State Machine (which I started using but found it difficult to correctly unit test) by following a similar pattern to the way that ...
1
vote
2
answers
2k
views
How to test Automatonymous state machines?
I'm trying to write tests for an Automatonymous state machine, but I'm having a fair bit of trouble getting it right, and I've found very little documentation.
Here's what I have at the moment for ...