Kafka acquisition: warn if no consumer group id and allow to read from a specific partition (#2612)

This commit is contained in:
blotus 2023-11-23 10:02:53 +01:00 committed by GitHub
parent 92f923cfa8
commit ec53c672dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 28 deletions

View file

@ -58,6 +58,16 @@ brokers:
topic: crowdsec`,
expectedErr: "",
},
{
config: `
source: kafka
brokers:
- localhost:9092
topic: crowdsec
partition: 1
group_id: crowdsec`,
expectedErr: "cannote create kafka reader: cannot specify both group_id and partition",
},
}
subLogger := log.WithFields(log.Fields{