class TrRMIte::Consumers::Nil

Public Class Methods

new(topic, registry_uri) click to toggle source
Calls superclass method TrRMIte::Consumer::new
# File lib/TrRMIte/consumers/nil.rb, line 5
def initialize(topic, registry_uri)
  super('NIL_CONSUMER', topic, registry_uri)

  @processed_event_count = 0
  @max_event_count = ENV['MAX_EVENT_COUNT'].to_i
end

Private Instance Methods

process(event) click to toggle source
# File lib/TrRMIte/consumers/nil.rb, line 14
def process event
  @stop_processing = (@processed_event_count += 1) == @max_event_count
end