Module: Karafka::Routing::Features::Eofed::Topic

Defined in:
lib/karafka/routing/features/eofed/topic.rb

Overview

Routing topic eofed API

Instance Method Summary collapse

Instance Method Details

#eofed(active = false) ⇒ Object

Parameters:

  • active (Boolean) (defaults to: false)

    should the #eofed job run on eof



10
11
12
13
14
# File 'lib/karafka/routing/features/eofed/topic.rb', line 10

def eofed(active = false)
  @eofed ||= Config.new(
    active: active
  )
end

#eofed?Boolean

Returns Are #eofed jobs active.

Returns:

  • (Boolean)

    Are #eofed jobs active



17
18
19
# File 'lib/karafka/routing/features/eofed/topic.rb', line 17

def eofed?
  eofed.active?
end

#to_hHash

Returns topic setup hash.

Returns:

  • (Hash)

    topic setup hash



22
23
24
25
26
# File 'lib/karafka/routing/features/eofed/topic.rb', line 22

def to_h
  super.merge(
    eofed: eofed.to_h
  ).freeze
end