Class: Karafka::App
- Inherits:
-
Object
- Object
- Karafka::App
- Extended by:
- Setup::Dsl
- Defined in:
- lib/karafka/app.rb
Overview
App class
Class Method Summary collapse
-
.boot! ⇒ Object
Sets up all the internal components and bootstrap whole app We need to know details about consumers in order to setup components, that's why we don't setup them after std setup is done.
-
.consumer_groups ⇒ Karafka::Routing::Builder
Consumers builder instance.
-
.reload ⇒ Object
Triggers reload of all cached Karafka app components, so we can use in-process in-development hot code reloading without Karafka process restart.
Methods included from Setup::Dsl
Class Method Details
.boot! ⇒ Object
Sets up all the internal components and bootstrap whole app We need to know details about consumers in order to setup components, that's why we don't setup them after std setup is done
14 15 16 17 18 19 |
# File 'lib/karafka/app.rb', line 14 def boot! initialize! Setup::Config.validate! Setup::Config.setup_components initialized! end |
.consumer_groups ⇒ Karafka::Routing::Builder
Returns consumers builder instance.
22 23 24 |
# File 'lib/karafka/app.rb', line 22 def consumer_groups config.internal.routing_builder end |
.reload ⇒ Object
Triggers reload of all cached Karafka app components, so we can use in-process in-development hot code reloading without Karafka process restart
28 29 30 31 32 |
# File 'lib/karafka/app.rb', line 28 def reload Karafka::Persistence::Consumers.clear Karafka::Persistence::Topics.clear config.internal.routing_builder.reload end |