Module: Karafka::Routing::Features::ActiveJob::Builder
- Included in:
 - Proxy
 
- Defined in:
 - lib/karafka/routing/features/active_job/builder.rb
 
Overview
Routing extensions for ActiveJob
Instance Method Summary collapse
- 
  
    
      #active_job_topic(name, &block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
This method simplifies routes definition for ActiveJob topics / queues by auto-injecting the consumer class.
 
Instance Method Details
#active_job_topic(name, &block) ⇒ Object
This method simplifies routes definition for ActiveJob topics / queues by auto-injecting the consumer class
      14 15 16 17 18 19 20 21 22 23 24 25 26 27 28  | 
    
      # File 'lib/karafka/routing/features/active_job/builder.rb', line 14 def active_job_topic(name, &block) topic(name) do consumer App.config.internal.active_job.consumer_class active_job true # This is handled by our custom ActiveJob consumer # Without this, default behaviour would cause messages to skip upon shutdown as the # offset would be committed for the last message manual_offset_management true next unless block instance_eval(&block) end end  |