Class: OMQ::SCATTER

Inherits:
Socket
  • Object
show all
Includes:
SingleFrame, Writable
Defined in:
lib/omq/scatter_gather.rb

Overview

Pipeline sender socket that round-robins to GATHER peers (ZeroMQ RFC 49).

Instance Method Summary collapse

Constructor Details

#initialize(endpoints = nil, linger: Float::INFINITY, send_hwm: nil, send_timeout: nil, backend: nil) ⇒ SCATTER

Creates a new SCATTER socket.

Parameters:

  • endpoints (String, Array<String>, nil) (defaults to: nil)

    endpoint(s) to connect to

  • linger (Numeric) (defaults to: Float::INFINITY)

    linger period in seconds (Float::INFINITY = wait forever, 0 = drop)

  • send_hwm (Integer, nil) (defaults to: nil)

    send high-water mark

  • send_timeout (Integer, nil) (defaults to: nil)

    send timeout in seconds

  • backend (Object, nil) (defaults to: nil)

    optional transport backend



16
17
18
19
20
# File 'lib/omq/scatter_gather.rb', line 16

def initialize(endpoints = nil, linger: Float::INFINITY, send_hwm: nil, send_timeout: nil, backend: nil)
  init_engine(:SCATTER, send_hwm: send_hwm, send_timeout: send_timeout, backend: backend)
  @options.linger = linger
  attach_endpoints(endpoints, default: :connect)
end