问题
I am looking for a simple .NET library that implements a concept of async message passing similar to Erlang OTP platform. So far, I have only found RetLang to be somewhat similar, but
- It seems to be abandoned, and
- It only supports message passing within one process.
回答1:
You can try with MSMQ .you can use for single or a group of messages you want to put in the queue and read from it later asynchronously. :)
回答2:
In my opinion the easiest way to do this in .net (aside from F# ;) ) is the TPL dataflow - lib
回答3:
Use MSMQ which is quite simple to implement. It is exactly what you need - asynchronous messaging system. WCF is also good but is more complex to manage (config files) and adds a bit of overhead. MSMQ is a standard (and free) Windows component but to use it you need to enable it. MSMQ can be used for local communication (same process or any 2 processes within the same Windows domain)
Read this answer for more details and code examples.
回答4:
Microsoft research developed and proved out (with EA/Bioware) a project called Orleans. It has been used in production and is being actively developed.
Quick Summary
Intro on Pluralsight
https://github.com/dotnet/orleans
回答5:
You can use WCF to send and receive asynchronous messages. you can read more at msdn
回答6:
Please have a look at spring messaging, this might be useful for you.
来源:https://stackoverflow.com/questions/9907309/asynchronous-message-passing-in-net