Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 423 Bytes

File metadata and controls

18 lines (12 loc) · 423 Bytes

OMQ::SCATTER and OMQ::GATHER

SCATTER and GATHER socket types (RFC 49).

Single-frame PUSH/PULL equivalent. SCATTER round-robins, GATHER fair-queues.

Usage

require "omq"
require "omq/scatter_gather"

gather  = OMQ::GATHER.bind("tcp://127.0.0.1:5555")
scatter = OMQ::SCATTER.connect("tcp://127.0.0.1:5555")

scatter << "work item"
msg = gather.receive  # => "work item"