Sha256: 876b20a9c9924af55a6396202409f04322e77ecdf8c557ddf6f2963a707ad4c9

Contents?: true

Size: 469 Bytes

Versions: 8

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

require_relative "consumer_mapper/base"

module Sbmt
  module KafkaConsumer
    module Routing
      class KarafkaV1ConsumerMapper < ConsumerMapper::Base
        # karafka v1 consumer group name mapper
        def call(raw_consumer_group_name)
          client_id = ActiveSupport::Inflector.underscore(Karafka::App.config.client_id).tr("/", "_")
          "#{client_id}_#{raw_consumer_group_name}"
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sbmt-kafka_consumer-3.3.2 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.3.1 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.3.0 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.2.2 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.2.1 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.2.0 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.1.0 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb
sbmt-kafka_consumer-3.0.0 lib/sbmt/kafka_consumer/routing/karafka_v1_consumer_mapper.rb