Class: Karafka::Admin::Configs
- Inherits:
-
Karafka::Admin
- Object
- Karafka::Admin
- Karafka::Admin::Configs
- Defined in:
- lib/karafka/admin/configs.rb,
lib/karafka/admin/configs/config.rb,
lib/karafka/admin/configs/resource.rb
Overview
Namespace for admin operations related to configuration management
At the moment Karafka supports configuration management for brokers and topics
You can describe configuration as well as alter it.
Altering is done in the incremental way.
Defined Under Namespace
Constant Summary
Constants inherited from Karafka::Admin
Instance Attribute Summary
Attributes inherited from Karafka::Admin
Class Method Summary collapse
Instance Method Summary collapse
-
#alter(*resources) ⇒ Object
Alters given resources based on the alteration operations accumulated in the provided resources.
-
#describe(*resources) ⇒ Array<Resource>
Fetches given resources configurations from Kafka.
Methods inherited from Karafka::Admin
cluster_info, #cluster_info, copy_consumer_group, #copy_consumer_group, create_partitions, #create_partitions, create_topic, #create_topic, delete_consumer_group, #delete_consumer_group, delete_topic, #delete_topic, #initialize, plan_topic_replication, #plan_topic_replication, read_lags_with_offsets, #read_lags_with_offsets, read_topic, #read_topic, read_watermark_offsets, #read_watermark_offsets, rename_consumer_group, #rename_consumer_group, seek_consumer_group, #seek_consumer_group, topic_info, #topic_info, trigger_rebalance, #trigger_rebalance, with_admin, #with_admin, with_consumer, #with_consumer
Constructor Details
This class inherits a constructor from Karafka::Admin
Class Method Details
.alter(*resources) ⇒ Object
24 25 26 |
# File 'lib/karafka/admin/configs.rb', line 24 def alter(*resources) new.alter(*resources) end |
.describe(*resources) ⇒ Object
17 18 19 |
# File 'lib/karafka/admin/configs.rb', line 17 def describe(*resources) new.describe(*resources) end |
Instance Method Details
#alter(*resources) ⇒ Object
This operation is not transactional and can work only partially if some config options are not valid. Always make sure, your alterations are correct.
We call it ‘#alter` despite using the Kafka incremental alter API because the regular alter is deprecated.
Alters given resources based on the alteration operations accumulated in the provided resources
69 70 71 72 73 74 |
# File 'lib/karafka/admin/configs.rb', line 69 def alter(*resources) operate_on_resources( :incremental_alter_configs, resources ) end |
#describe(*resources) ⇒ Array<Resource>
Even if you request one resource, result will always be an array with resources
Fetches given resources configurations from Kafka
46 47 48 49 50 51 |
# File 'lib/karafka/admin/configs.rb', line 46 def describe(*resources) operate_on_resources( :describe_configs, resources ) end |