elsa-workflows / elsa-workflows/elsa-core

Using MassTransit feature with concurrent processes

Open
#6,336 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

## Description
I couldn't find a way how to distinguish several instances of one process when it comes to receive message with MassTransit feature.
I have very simple process, which sends UpdateClient message and then waits for arriving ClientUpdated message.
If I start 2 processes at the same time, they all get completed when the first ClientUpdated message arrives.
Using CorrelateId is not working: screenshots shows 2 processes with different CorrelationID (77 and 78), ClientUpdated sent by process with CorrelationID = 77.
UpdateClient and ClientUpdated are activities, created by MassTransit feature from registered messages.

## Expected Behavior
Upon receiving ClientUpdated message only one process should be completed. Which one - could depends on CorrelationID (or ClientId).

## Screenshots
![Image](https://github.com/user-attachments/assets/73ddb807-32d3-449f-91f5-2f68d063220f)

![Image](https://github.com/user-attachments/assets/ef12b114-e1ee-4f2d-8d9a-470280b838af)

![Image](https://github.com/user-attachments/assets/01a25879-155e-4725-a0c5-25d42be05c18)

## Environment
- **Elsa Package Version**: 3.3.1
- **Operating System**: Windows 11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.