class NsqEnv::Consumer
Public Class Methods
new(opts = {})
click to toggle source
Calls superclass method
# File lib/nsq-env/consumer.rb, line 5 def initialize(opts = {}) raise ArgumentError.new "opts should have a :topic key" if not opts[:topic] raise ArgumentError.new "opts should have a :channel key" if not opts[:channel] opts[:nsqlookupd] = ENV["NSQLOOKUPD_URLS"].split(",") opts[:max_in_flight] ||= 5 opts.merge! TLSContext.env if ENV["NSQD_TLS"] == "true" super(opts) end