Skip to content

Instantly share code, notes, and snippets.

@jhaubrich
Created May 29, 2013 14:35
Show Gist options
  • Save jhaubrich/5670737 to your computer and use it in GitHub Desktop.
Save jhaubrich/5670737 to your computer and use it in GitHub Desktop.
Subscribing to a 0MQ feed from any language is simple.
// http://www.zeromq.org/bindings:clr
subscriber.Bind( address: "tcp://GLaDOS:8084" );
subscriber.Subscribe( prefix: "" ); // subscribe to all messages
// Add a handler to the subscriber's OnReceive event
subscriber.OnReceive += () => {
String message;
subscriber.Receive( out message, nonblocking: true );
Console.WriteLine( message );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment