Naive implementation of stocks exchange matching engine using netmq and actor model.
The API of engine exposed via two TCP sockets - one for sending commands and second for receiving events.
The number of actors determinated based on number of logical processes on the machine. Here is a high level design of the application:
See unit test for working example.