dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.09k stars 2.03k forks source link

using Orleans like a message broker #1767

Closed sharpcoder7 closed 8 years ago

sharpcoder7 commented 8 years ago

Hello! I have a question about architecture in real world system. I have a lot of processing modules (over 20 classes with same interface and different implementation). All of them need to subscribe to a single Stream and process a input data in different way (different business logic for each module). Is it possible to resolve this task using Orleans? Thanks.

now the same system based on rabbitmq/masstransit

sergeybykov commented 8 years ago

One way to design this is to have those 20 processing modules as 20 grain classes, and have them implicitly subscribe to a stream of input data. For that you'll need a stream provider for RabbitMQ. Alternatively, you could have a separate process or processes (Orleans clients) reading data from RabbitMQ and sending it to processor grains. Hard to tell pros and cons from the above description without more details.