Project

zero-moo

0.0
No commit activity in last 3 years
No release in over 3 years
ZMQ based communication util
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

= 2.0.4
 Project Readme

Zero::Moo

An easy to use publisher - subscriber communication util.

It is currently hard under development. There is no recovery after server restart

Unit tests will also follow.

Installation

Add this line to your application's Gemfile:

gem 'zero-moo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install zero-moo

Usage

Publisher - Subscriber

**Add a subscriber: **

 require 'zero/moo/subscriber'
 s = Zero::Moo::Subscriber address: '127.0.0.1:64000'
 s.on_receive('topic1'){|message| puts message}

**Add a publisher: **

 require 'zero/moo/publisher'
 p = Zero::Moo::Publisher address: '127.0.0.1:64000'
 p.push! "moo", topic: 'topic1'

Pusher - Puller

**Add a puller: **

 require 'zero/moo/puller'
 s = Zero::Moo::Puller address: '127.0.0.1:64000'
 s.on_receive{|message| puts message}

**Add a pusher: **

 require 'zero/moo/pusher'
 p = Zero::Moo::Pusher address: '127.0.0.1:64000'
 p.push! "moo"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/timmyArch/zero-moo.

License

The gem is available as open source under the terms of the MIT License.