Skip to content

Commit 6afa8a7

Browse files
Handle multiple cleanup policies
cleanup.policy can be a comma-separated list https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy
1 parent 1f18edc commit 6afa8a7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/kaf/topic.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,12 @@ var describeTopicCmd = &cobra.Command{
200200

201201
var compacted bool
202202
for _, e := range cfg {
203-
if e.Name == "cleanup.policy" && e.Value == "compact" {
204-
compacted = true
203+
if e.Name == "cleanup.policy" {
204+
for _, setting := range strings.Split(e.Value, ",") {
205+
if setting == "compact" {
206+
compacted = true
207+
}
208+
}
205209
}
206210
}
207211

0 commit comments

Comments
 (0)