doujiang24/lua-resty-kafka

Producer cannot send with Confluent Cloud due to SASL error

samcrawford opened this issue · 3 comments

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 samcrawford@39e6e31

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.

@samcrawford seems you are right, could you please create a PR for this fix, thanks.

Thanks. Raised #115. And thanks for creating such a good library!

#115 has been merged, closing this issue now. Thanks @doujiang24 !