Module: Karafka::Routing::Features::ManualOffsetManagement::Topic
- Defined in:
 - lib/karafka/routing/features/manual_offset_management/topic.rb
 
Overview
Topic extensions to be able to manage manual offset management settings
Instance Method Summary collapse
- 
  
    
      #manual_offset_management(active = false)  ⇒ Config 
    
    
  
  
  
  
  
  
  
  
  
    
where the boolean would be an argument.
 - 
  
    
      #manual_offset_management?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    
Is manual offset management enabled for a given topic.
 - 
  
    
      #to_h  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Topic with all its native configuration options plus manual offset management namespace settings.
 
Instance Method Details
#manual_offset_management(active = false) ⇒ Config
    Note:
    
  
Since this feature supports only one setting (active), we can use the old API
where the boolean would be an argument
      15 16 17  | 
    
      # File 'lib/karafka/routing/features/manual_offset_management/topic.rb', line 15 def manual_offset_management(active = false) @manual_offset_management ||= Config.new(active: active) end  | 
  
#manual_offset_management? ⇒ Boolean
Returns is manual offset management enabled for a given topic.
      20 21 22  | 
    
      # File 'lib/karafka/routing/features/manual_offset_management/topic.rb', line 20 def manual_offset_management? manual_offset_management.active? end  | 
  
#to_h ⇒ Hash
Returns topic with all its native configuration options plus manual offset management namespace settings.
      26 27 28 29 30  | 
    
      # File 'lib/karafka/routing/features/manual_offset_management/topic.rb', line 26 def to_h super.merge( manual_offset_management: manual_offset_management.to_h ).freeze end  |