c# - Specify the order in which MassTransit consumers will consume the same event -


i have 2 consumers: firstconsumer , secondconsumer consume same type of event. however, operations secondconsumer partially depend on output of operations performed firstconsumer.

is there way ensure event always consumed first firstconsumer , after that's done, secondconsumer?

the quick, ugly way fix combine them 1 consumer , ensure concurrency there. however, consumers have different responsibilities , prefer avoid that.

another solution publish event last operation of firstconsumer , change secondconsumer consume event instead.

i've did quick read on automatonymous, however, doesn't feel it's tool job.

is there way configure in masstransit , enforce secondconsumer await till firstconsumer has done job?

in end looks automatonymous way go.

basically, i'm going implement described here: http://docs.masstransit-project.com/en/v2-master/overview/saga.html#combining-events-think-fork-join, have firstconsumer job on occurrence of same event have, have publish event when it's done. secondconsumer wait until both events have completed , start processing after that.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -