class RFlow::Configuration::BrokeredZMQConnection

Subclass of {Connection} for brokered ZMQ connections and their required options.

We name the IPCs to resemble a quasi-component. Outputting to this connection goes to the in of the IPC pair. Reading input from this connection comes from the out of the IPC pair.

The broker shuttles messages between the two to support the many-to-many delivery pattern.

Public Class Methods

default_options() click to toggle source

Default ZeroMQ options required for broker connection.

# File lib/rflow/configuration/connection.rb, line 99
def self.default_options
  {
    'output_socket_type'    => 'PUSH',
    'output_address'        => lambda{|conn| "ipc://rflow.#{conn.uuid}.in"},
    'output_responsibility' => 'connect',
    'input_socket_type'     => 'PULL',
    'input_address'         => lambda{|conn| "ipc://rflow.#{conn.uuid}.out"},
    'input_responsibility'  => 'connect',
  }
end

Public Instance Methods

brokers() click to toggle source

A brokered ZMQ connection requires one broker process. @return [Array<Broker>]

# File lib/rflow/configuration/connection.rb, line 112
def brokers
  @brokers ||= [ZMQStreamer.new(self)]
end