Module: Karafka::Pro::Routing::Features::OffsetMetadata::Topic
- Defined in:
- lib/karafka/pro/routing/features/offset_metadata/topic.rb
Overview
Commit Metadata API extensions
Instance Method Summary collapse
-
#offset_metadata(cache: true, deserializer: STRING_DESERIALIZER) ⇒ Config
This feature config.
-
#offset_metadata? ⇒ true
Is offset metadata active (it always is).
-
#to_h ⇒ Hash
Topic with all its native configuration options plus offset metadata settings.
Instance Method Details
#offset_metadata(cache: true, deserializer: STRING_DESERIALIZER) ⇒ Config
Returns this feature config.
40 41 42 43 44 45 46 |
# File 'lib/karafka/pro/routing/features/offset_metadata/topic.rb', line 40 def (cache: true, deserializer: STRING_DESERIALIZER) @offset_metadata ||= Config.new( active: true, cache: cache, deserializer: deserializer ) end |
#offset_metadata? ⇒ true
Returns is offset metadata active (it always is).
49 50 51 |
# File 'lib/karafka/pro/routing/features/offset_metadata/topic.rb', line 49 def .active? end |
#to_h ⇒ Hash
Returns topic with all its native configuration options plus offset metadata settings.
55 56 57 58 59 |
# File 'lib/karafka/pro/routing/features/offset_metadata/topic.rb', line 55 def to_h super.merge( offset_metadata: .to_h ).freeze end |