[zeromq-dev] .NET Example

Martin Sustrik sustrik at fastmq.com
Sat Apr 25 08:25:27 CEST 2009

Hi Mitchel,

> Congrats on the product, ØMQ looks really neat.
> I've been evaluating messaging systems for the last week and would 
> really like to try out ØMQ.
> Are there any C# or .NET examples available?

Have a look at performance tests (cs_local_thr.cs, cs_remote_thr.cs etc.)

Use C++ man page for detailed info on the API. Function names, parameter 
names and semantics are the same for all languages:


> I did add libclrzmq.dll to one of my .NET projects. However, I couldn't 
> figure out what the next step was.
> Does ØMQ offer persistent storage for messages? (Basically, to CYA in 
> the event that a server went down and came back up.)

0MQ doesn't have a server. It uses "brokerless" model. Thus you can 
choose either to communicate directly between 2 applications or you can 
write your own mini-broker. Have a look at "chat" example. The 
"chatroom" component is actually a mini-broker consisting of a single queue.

As for persistent messages, no, they are not supported at the moment 
(although on-disk offload of messages is supported). You'll have to 
write your messages into database by hand. However, note that storing 
message into database decreases performance by approximately two orders 
of magnitude, so you should decide whether it's worth of it.

Hope this helps.

More information about the zeromq-dev mailing list