I've been trying to get this library working with Confluent Cloud, which makes use of SASL_SSL auth. I found that I could retrieve the list of topics and partitions, but any sending would result in err: closed after a delay.
After some debugging, I found that the sasl_config was not being propagated to the downstream requests to the brokers obtained in the fetch_metadata function. I modified the code to inject sasl_config and then everything works.
I don't know if this is some special requirement from Confluent Cloud, or if this is a genuine bug. Either way, I'm posting here in case it helps someone else struggling with this.
I've been trying to get this library working with Confluent Cloud, which makes use of SASL_SSL auth. I found that I could retrieve the list of topics and partitions, but any sending would result in
err: closed
after a delay.After some debugging, I found that the sasl_config was not being propagated to the downstream requests to the brokers obtained in the fetch_metadata function. I modified the code to inject sasl_config and then everything works.
My modified code is at https://github.com/samcrawford/lua-resty-kafka/commit/39e6e31040c801369fcb206ce7cb0bd600c38527
I don't know if this is some special requirement from Confluent Cloud, or if this is a genuine bug. Either way, I'm posting here in case it helps someone else struggling with this.