Sha256: 11ed3c99b5149239802f7967bf3875e722be74da6a9523ef15b3d80310386589

Contents?: true

Size: 784 Bytes

Versions: 12

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

module Karafka
  # Extensions for Karafka components
  module Extensions
    # Additional Karafka::Attributes map topic attributes that can be used when worker
    # is active and we use sidekiq backend
    module SidekiqAttributesMap
      # Class methods that extend the attributes map class
      module ClassMethods
        # Extra topic fields that we need to have to work with sidekiq backend
        # @return [Array<Symbol>] available topic options
        def topic
          super + %i[interchanger worker]
        end
      end

      # Prepends class methods into attributes map
      # @param base [Class] class that we prepend to
      def self.prepended(base)
        base.singleton_class.prepend ClassMethods
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
karafka-sidekiq-backend-1.4.9 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.7 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.6 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.5 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.4 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.3 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.2 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.1 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.4.0 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.3.1 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.3.0 lib/karafka/extensions/sidekiq_attributes_map.rb
karafka-sidekiq-backend-1.3.0.rc1 lib/karafka/extensions/sidekiq_attributes_map.rb