Module: Karafka::Pro::Routing::Features::ScheduledMessages::Topic
- Defined in:
- lib/karafka/pro/routing/features/scheduled_messages/topic.rb
Overview
Topic extensions to be able to check if given topic is a scheduled messages topic Please note, that this applies to both the schedules topic and logs topic
Instance Method Summary collapse
- #scheduled_messages(active = false) ⇒ Object
-
#scheduled_messages? ⇒ Boolean
Is this an ActiveJob topic.
-
#to_h ⇒ Hash
messages namespace settings.
Instance Method Details
#scheduled_messages(active = false) ⇒ Object
15 16 17 |
# File 'lib/karafka/pro/routing/features/scheduled_messages/topic.rb', line 15 def (active = false) @scheduled_messages ||= Config.new(active: active) end |
#scheduled_messages? ⇒ Boolean
Returns is this an ActiveJob topic.
20 21 22 |
# File 'lib/karafka/pro/routing/features/scheduled_messages/topic.rb', line 20 def .active? end |
#to_h ⇒ Hash
messages namespace settings
26 27 28 29 30 |
# File 'lib/karafka/pro/routing/features/scheduled_messages/topic.rb', line 26 def to_h super.merge( scheduled_messages: .to_h ).freeze end |