zguide
The zguide is a well-written, exhaustive explanation of the library. It should definitely be read. And then read again. Also, while the zguide features examples in many languages, the F#-specific zguide code samples have been collected here as a convenience.
Please note: the zguide covers version 3.2.x of ZeroMQ, while the examples below have been modified to run against version 4.0.x of ZeroMQ.
Chapter 1 examples
Hello World server ... Expects "Hello" from client, replies with "World"
Hello World client ... Sends "Hello" to server, expects "World" back
0MQ Version ... Displays the version of 0MQ currently being used
Weather Update server ... Publishes random weather updates
Weather Update client ... Collects weather updates and finds avg temp in zipcode
Task worker ... Collects workloads from ventilator and sends results to sink
Task ventillator ... Sends batch of tasks to workers
Task sink ... Collects results from workers
Chapter 2 examples
Multi-socket Reader ... Reads from multiple sockets using a simple recv loop
Multi-socket Poller ... Reads from multiple sockets using ZMQ's polling functionality
Request-Reply Client ... Sends "Hello" to a server (via a broker) and expects "World" back
Request-Reply Worker ... Expects "Hello" from clients (via a broker) and replies with "World"
Request-Reply Broker ... A simple broker for connecting client requests to server replies
Message Queue Broker ... Like [Request-Reply Broker] but using device (i.e. a proxy)
Weather Update Proxy ... A proxy device which does network bridging
Task Worker (2nd design) ... Like Task Worker, but with a extra flow to receive and respond to a 'KILL' signal
Task Sink (2nd design) ... Like Task Sink, but with a extra flow to receive and respond to a 'KILL' signal
Interrupt Handling ... Shows how to handle manual interrupt (i.e. CTRL+C) in a console application
Multi-threaded Service ... Passes actual handling of requests to workers on other threads
Signaling Between Threads ... Demonstrates inter-thread coordination
Synchronized Publisher ... Synchronizes data distribution across a fixed number of clients
Synchronized Subscriber ... Participates in node-coordinated data distribution
Pub-Sub Envelope Publisher ... Sends multi-part messages where the first frame is the subscription topic
Pub-Sub Envelope Subscriber ... Only receives messages with a specific topic frame
Chapter 3 examples
- Coming soon.
Chapter 4 examples
- Coming soon.
Chapter 5 examples
- Coming soon.
The documentation accompanying fszmq, and any sample code contained therein, is available under the MIT LICENSE which allows modification and reuse for both commercial non-commercial purposes. For more information see the documentation license file in the GitHub repository.