Sha256: bcd571767a6dea01b5ec3d399ea8a2cf932806a0772a63984a3cf1133e0af4cc

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

module Karafka
  # ActiveJob related Karafka stuff
  module ActiveJob
    # Karafka routing ActiveJob related components
    module Routing
      # Routing extensions for ActiveJob
      module Extensions
        # This method simplifies routes definition for ActiveJob topics / queues by auto-injecting
        # the consumer class
        # @param name [String, Symbol] name of the topic where ActiveJobs jobs should go
        def active_job_topic(name)
          topic(name) do
            consumer App.config.internal.active_job.consumer
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
karafka-2.0.0.beta2 lib/karafka/active_job/routing/extensions.rb