Skip to content

Commit

Permalink
Allow for sasl to be configured even if the CA cert is not explicitly…
Browse files Browse the repository at this point in the history
… set for the kafka connection (#335)
  • Loading branch information
dehort authored Oct 2, 2023
1 parent 03271a5 commit 2f882ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ func Producer(in chan validators.ValidationMessage, config *ProducerConfig) {

if config.CA != "" {
_ = configMap.SetKey("ssl.ca.location", config.CA)
_ = configMap.SetKey("security.protocol", config.KafkaSecurityProtocol)
}

if config.SASLMechanism != "" {
_ = configMap.SetKey("sasl.mechanism", config.SASLMechanism)
_ = configMap.SetKey("sasl.username", config.Username)
_ = configMap.SetKey("sasl.password", config.Password)
}
if config.SASLMechanism != "" {
_ = configMap.SetKey("security.protocol", config.KafkaSecurityProtocol)
_ = configMap.SetKey("sasl.mechanism", config.SASLMechanism)
_ = configMap.SetKey("sasl.username", config.Username)
_ = configMap.SetKey("sasl.password", config.Password)
}

if config.Debug {
Expand Down

0 comments on commit 2f882ed

Please sign in to comment.