ma-zmq

MaZMQ was born as an extension from EMZeroMQ, now aims to add more features than its inspiration. Its first purpose was to have a RoundRobin handler to work with ZMQ sockets. Which by this moment works, but is very restricted, and harcoded too. Then I started adding some sugar, studying both EM and ZMQ and turned out to be independent gem. As a piece of another project, MaZMQ will be updated in the following.

Hope you enjoy it !

Using MaZMQ

EM.run do
  request = MaZMQ::Request.new
  request.timeout(5)
  request.connect(:tcp, '127.0.0.1', 3200)

  request.on_timeout {
    puts "Server has no response!"
  }
  request.on_read { |msg|
    puts "Received: #{msg}"
  }
  request.send_string('ping!')
end

Contributing to ma-zmq

Copyright © 2011 Fernando Alonso. See LICENSE.txt for further details.