lib/rflow/broker.rb in rflow-1.3.0 vs lib/rflow/broker.rb in rflow-1.3.1

- old
+ new

@@ -1,11 +1,15 @@ require 'rflow/child_process' class RFlow - # A message broker to mediate messages along a connection. - # The broker runs in a child process and will not return from spawn!. + # A message broker process to mediate messages along a connection. + # The broker runs in a child process and will not return from {spawn!}. class Broker < ChildProcess class << self + # Build the broker from the connection configuration. + # Only supports {RFlow::Configuration::ZMQStreamer} configurations. + # @param config [RFlow::Configuration::ZMQStreamer] the connection configuration + # @return [RFlow::Connections::ZMQStreamer] def build(config) case config.class.name when 'RFlow::Configuration::ZMQStreamer' RFlow::Connections::ZMQStreamer.new(config) else