This is an implementation of the Reactor pattern described in Pattern-Oriented Software Architecture (Volume 2). It allows an asynchronous application to be described as one or more “reactions” to events, in this case either I/O conditions on a ZMQ socket or a timer expiring.