pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

add routing slip features #188

Closed yonglehou closed 7 years ago

yonglehou commented 7 years ago

does rawrabbit add routing slip features like MassTransit Courier?

pardahlman commented 7 years ago

Hello! I haven't used the routing slip feature of MassTransit myself, but I think that the Message Sequence feature does something similar.

var sequence = _client.ExecuteSequence(c => c
    .PublishAsync<UserLoginAttempted>()
    .When<GeograficPositionDetected>((msg, ctx) => ActOnGeograficPosition(msg.Position))
    .When<ContactDetailsLoaded>((msg, ctx) => ActOnContactDetails(msg.Details))
    .Complete<UserLoggoedIn>()
);

In the coming 2.0 release (available as pre release now) you could also use the State Machine operation for long lived executions.

Hope this helps!

yonglehou commented 7 years ago

thanks for your reply,i get it.