Skip to content

Commit 1c785eb

Browse files
authored
Merge pull request #267 from SoMuchForSubtlety/fix-compaction-detection
Handle multiple cleanup policies
2 parents 606f7f0 + 6afa8a7 commit 1c785eb

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)