Class: Deimos::Consumer

Inherits:
Karafka::BaseConsumer
  • Object
show all
Includes:
Deimos::Consume::BatchConsumption, Deimos::Consume::MessageConsumption, SharedConfig
Defined in:
lib/deimos/consumer.rb

Overview

Basic consumer class. Inherit from this class and override either consume_message or consume_batch, depending on the ‘:batch` config setting.

Direct Known Subclasses

ActiveRecordConsumer

Instance Method Summary collapse

Methods included from Deimos::Consume::BatchConsumption

#consume_batch

Methods included from Deimos::Consume::MessageConsumption

#consume_message

Instance Method Details

#consumeObject



17
18
19
20
21
22
23
# File 'lib/deimos/consumer.rb', line 17

def consume
  if self.topic.each_message
    _consume_messages
  else
    _consume_batch
  end
end