nats-io / nats-kafka

NATS to Kafka Bridging
Apache License 2.0
131 stars 32 forks source link

Bridge not working when "insecureskipverify" flag is enabled in SASL Configuration #75

Open kpnishant opened 2 years ago

kpnishant commented 2 years ago

When we enable insecureskipverify flag, bridge always gives below error, and it doesnt connect to kafka broker.

ERROR=>

kafka: client has run out of available brokers to talk to (Is your cluster reachable?)

The reason this might be happening is, In server/kafka/consumer.go while updating insecureskipverify flag the complate configuration of kafka has been overrided, so except insecureskipverify all the previous config is lost and bridge is not finding any brokers to connect to.

Current Code sc.Net.TLS.Config = &tls.Config{ InsecureSkipVerify: cc.SASL.InsecureSkipVerify, } instead can it just be sc.Net.TLS.Config.InsecureSkipVerify = true