lib/karafka/templates/karafka.rb.example in karafka-1.1.2 vs lib/karafka/templates/karafka.rb.example in karafka-1.2.0.beta1

- old
+ new

@@ -19,21 +19,32 @@ config.client_id = 'example_app' config.backend = :inline config.batch_fetching = true end + after_init do |config| + # Put here all the things you want to do after the Karafka framework + # initialization + end + + # Comment out this part if you are not using instrumentation and/or you are not + # interested in logging events for certain environments. Since instrumentation + # notifications add extra boilerplate, if you want to achieve max performance, + # listen to only what you really need for given environment. + Karafka.monitor.subscribe(Karafka::Instrumentation::Listener) + consumer_groups.draw do # topic :example do - # controller ExampleController + # consumer ExampleConsumer # end # consumer_group :bigger_group do # topic :test do - # controller TestController + # consumer TestConsumer # end # # topic :test2 do - # controller Test2Controller + # consumer Test2Consumer # end # end end end