Class: Karafka::Cli::Server
Overview
Server Karafka Cli action
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call ⇒ Object
Start the Karafka server.
Methods inherited from Base
bind_to, desc, #initialize, option
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Instance Method Details
#call ⇒ Object
Start the Karafka server
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/karafka/cli/server.rb', line 20 def call cli.info validate! if cli.[:daemon] FileUtils.mkdir_p File.dirname(cli.[:pid]) daemonize end # We assign active topics on a server level, as only server is expected to listen on # part of the topics Karafka::Server.consumer_groups = cli.[:consumer_groups] Karafka::Server.run end |