From 88aeec3433974f1fe1896a1ce10d577e90133d35 Mon Sep 17 00:00:00 2001 From: Dirk Wilden Date: Thu, 18 Jan 2024 11:05:02 +0100 Subject: [PATCH] use a better default for replication-factor when creating a new topic (fixes #180) --- CHANGELOG.md | 3 +++ cmd/create/create-topic.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cdb36a3..a7ea9123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#184](https://github.com/deviceinsight/kafkactl/pull/184) Added option to show default configs when describing topics - [#183](https://github.com/deviceinsight/kafkactl/issues/183) Add command `delete records` to delete records from topic +### Changed +- [#180](https://github.com/deviceinsight/kafkactl/issues/180) Change default for replication-factor when creating topics + ## 3.5.1 - 2023-11-10 ## 3.5.0 - 2023-11-10 diff --git a/cmd/create/create-topic.go b/cmd/create/create-topic.go index 384aa4a4..35c34f41 100644 --- a/cmd/create/create-topic.go +++ b/cmd/create/create-topic.go @@ -25,7 +25,7 @@ func newCreateTopicCmd() *cobra.Command { } cmdCreateTopic.Flags().Int32VarP(&flags.Partitions, "partitions", "p", 1, "number of partitions") - cmdCreateTopic.Flags().Int16VarP(&flags.ReplicationFactor, "replication-factor", "r", 1, "replication factor") + cmdCreateTopic.Flags().Int16VarP(&flags.ReplicationFactor, "replication-factor", "r", -1, "replication factor") cmdCreateTopic.Flags().BoolVarP(&flags.ValidateOnly, "validate-only", "v", false, "validate only") cmdCreateTopic.Flags().StringArrayVarP(&flags.Configs, "config", "c", flags.Configs, "configs in format `key=value`")