lib/rimless/consumer.rb
def topics(topics)
        consumer_groups.draw do
          consumer_group Rimless.configuration.client_id do
            topics.each do |topic_parts, dest_consumer|
              Rimless.consumer.topic_names(topic_parts).each do |topic_name|
                topic(topic_name) do
                  consumer dest_consumer
                  worker Rimless::ConsumerJob
                  interchanger Rimless::Karafka::Base64Interchanger.new
                end
              end
            end
          end
        end

        self
      end
# Configure the topics-consumer routing table in a lean way.
#
# Examples:
#
#   topics({ app: :test_app, name: :admins } => YourConsumer)
#   topics({ app: :test_app, names: %i[users admins] } => YourConsumer)
#
# @param topics [Hash{Hash => Class}] the topic to consumer mapping
#
# rubocop:disable Metrics/MethodLength because of the Karafka DSL
Configure the topics-consumer routing table in a lean way.
Examples.


Configure the topics - consumer routing table in a lean way . Examples .
def topics(topics)
        consumer_groups.draw do
          consumer_group Rimless.configuration.client_id do
            topics.each do |topic_parts, dest_consumer|
              Rimless.consumer.topic_names(topic_parts).each do |topic_name|
                topic(topic_name) do
                  consumer dest_consumer
                  worker Rimless::ConsumerJob
                  interchanger Rimless::Karafka::Base64Interchanger.new
                end
              end
            end
          end
        end
        self
      end
def topics ( topics ) consumer_groups . draw do consumer_group Rimless . configuration . client_id do topics . each do | topic_parts , dest_consumer | Rimless . consumer . topic_names ( topic_parts ) . each do | topic_name | topic ( topic_name ) do consumer dest_consumer worker Rimless :: ConsumerJob interchanger Rimless :: Karafka :: Base64Interchanger . new end end end end end self end
Configure the topics-consumer routing table in a lean way.
Configure the topics - consumer routing table in a lean way .
topics
the topic to consumer mapping rubocop:disable Metrics/MethodLength because of the Karafka DSL
the topic to consumer mapping rubocop : disable Metrics / MethodLength because of the Karafka DSL