Kafka acquisition: do not create empty events when a read error occurs (#2466)
This commit is contained in:
parent
0040569fa9
commit
43ef32aa8d
|
@ -149,7 +149,9 @@ func (k *KafkaSource) ReadMessage(out chan types.Event) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
k.logger.Errorln(fmt.Errorf("while reading %s message: %w", dataSourceName, err))
|
k.logger.Errorln(fmt.Errorf("while reading %s message: %w", dataSourceName, err))
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
k.logger.Tracef("got message: %s", string(m.Value))
|
||||||
l := types.Line{
|
l := types.Line{
|
||||||
Raw: string(m.Value),
|
Raw: string(m.Value),
|
||||||
Labels: k.Config.Labels,
|
Labels: k.Config.Labels,
|
||||||
|
@ -223,7 +225,6 @@ func (kc *KafkaConfiguration) NewTLSConfig() (*tls.Config, error) {
|
||||||
caCertPool.AppendCertsFromPEM(caCert)
|
caCertPool.AppendCertsFromPEM(caCert)
|
||||||
tlsConfig.RootCAs = caCertPool
|
tlsConfig.RootCAs = caCertPool
|
||||||
|
|
||||||
tlsConfig.BuildNameToCertificate()
|
|
||||||
return &tlsConfig, err
|
return &tlsConfig, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue