Class: Rimless::Karafka::PassthroughMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rimless/karafka/passthrough_mapper.rb

Overview

The Karafka framework makes some assumptions about the consumer group and topic names. We have our own opinions/conventions, so we just pass them through unmodified.

Instance Method Summary collapse

Instance Method Details

#call(raw_consumer_group_name) ⇒ String, Symbol

We do not want to modify the given consumer group name, so we pass it through.

Parameters:

  • raw_consumer_group_name (String, Symbol)

    the original consumer group name

Returns:

  • (String, Symbol)

    the original consumer group name



15
16
17
# File 'lib/rimless/karafka/passthrough_mapper.rb', line 15

def call(raw_consumer_group_name)
  raw_consumer_group_name
end

#incoming(topic) ⇒ String, Symbol Also known as: outgoing

We do not want to modify the given topic name, so we pass it through.

Parameters:

  • topic (String, Symbol)

    the original topic name

Returns:

  • (String, Symbol)

    the original topic name



23
24
25
# File 'lib/rimless/karafka/passthrough_mapper.rb', line 23

def incoming(topic)
  topic
end