fixed typo in a rescue clause
ported events sending code to zmq forwarder and refactored a bit