Project

jrzmq

0.0
No commit activity in last 3 years
No release in over 3 years
ZeroMQ JRuby Bindings using JeroMQ.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.1.0
~> 0.3.1
~> 2.14.1

Runtime

>= 1.0.2
 Project Readme

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