Skip to content

Provides JRuby Bindings to a Pure Java implementation of libzmq (ZeroMQ).

License

Notifications You must be signed in to change notification settings

outcastgeek/jrzmq

Repository files navigation

jrzmq Build Status Code Climate Dependency Status

Provides JRuby Bindings to a Pure Java implementation of libzmq (ZeroMQ).

Installation

    jruby -S gem install jrzmq
    gem "jrzmq", "~> 1.0.3.2"

example

    require 'jrzmq'

    context = ZMQ::Context.new(1)

    puts "Opening connection for READ DOWNSTREAM"
    inbound = context.socket(ZMQ::UPSTREAM)
    inbound.bind("ipc://localconnection")
    inbound.set_receive_time_out 10

    puts "Opening connection for WRITE UPSTREAM"
    outbound = context.socket(ZMQ::DOWNSTREAM)
    outbound.connect("ipc://localconnection")
    outbound.set_send_time_out 10

    messages = %w{Hello  World! QUIT}
    
    messages.each do |msg|
      outbound.send(msg)
    end
      
    loop do
      received_msg = inbound.recv_str
      puts "Received #{received_msg}"
      break if received_msg == "QUIT"
    end

license

JRZMQ's code is MIT, but it relies upon JeroMQ which has the following:

COPYING

COPYING.LESSER

About

Provides JRuby Bindings to a Pure Java implementation of libzmq (ZeroMQ).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages