Skip to content

Commit

Permalink
[CLOUDTRUST-3991] Add tls to Kafka config (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
basbeu committed May 30, 2023
1 parent dae7be6 commit 45efd7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions events/kafkaproducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ func NewEventKafkaProducer(ctx context.Context, c KafkaProducerConfig, logger lo
config.Net.SASL.Mechanism = sarama.SASLTypeOAuth
config.Net.SASL.TokenProvider = NewTokenProvider(c.ClientID, c.ClientSecret, c.TokenURL)

config.Net.TLS.Enable = true

producer, err := sarama.NewSyncProducer(c.Brokers, config)
if err != nil {
logger.Error(ctx, "msg", "Failed to start Kafka producer", "error", err)
Expand Down

0 comments on commit 45efd7b

Please sign in to comment.