OMQ::RADIO and OMQ::DISH

CI Gem Version License: ISC Ruby

RADIO and DISH socket types with UDP transport (RFC 48) for OMQ.

Group-based pub/sub. RADIO publishes to named groups; DISH joins groups of interest. Works over TCP, IPC, inproc, and unicast UDP.

Usage

require "omq"
require "omq/rfc/radiodish"

dish = OMQ::DISH.bind("tcp://127.0.0.1:5555")
dish.join("weather")

radio = OMQ::RADIO.connect("tcp://127.0.0.1:5555")
radio.publish("weather", "sunny")

group, msg = dish.receive  # => ["weather", "sunny"]

UDP

RADIO/DISH also runs over plain UDP. The endpoint scheme is udp:// and the rest of the API is unchanged:

require "omq"
require "omq/rfc/radiodish"

dish = OMQ::DISH.bind("udp://127.0.0.1:5555")
dish.join("weather")

radio = OMQ::RADIO.connect("udp://127.0.0.1:5555")
radio.publish("weather", "sunny")

group, msg = dish.receive  # => ["weather", "sunny"]

Each message is a single UDP datagram — there is no handshake, no reconnect, and no delivery guarantee. Payloads must fit inside one datagram (typically ≤ 1472 bytes on Ethernet).

Installation

gem "omq-rfc-radiodish"

Requires omq >= 0.12.

License

ISC