-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to: Writer + TLS and SASL (kafka.Dialer in Writer.Transport?) #898
Comments
Nevermind, solved by setting everything into the transport. |
@fracasula running into a similar issue here: what do you mean by "setting everything into transport"? Do you mean not creating a custom dialer? I am actually not doing that myself...
|
@ekeric13 this is how I ended up building my writer with the transport: https://github.com/rudderlabs/rudder-server/blob/v1.0.2/services/streammanager/kafka/client/producer.go#L39 |
Okay I think my issue may have been my MSK IAM permissions being too strict. |
Can somebody provide an example of configuration with a writer + SASL and TLS?
This is what I tried so far:
With the above I get:
If I simply remove the transport from the writer it works:
As a sidenote, even if I create the topic beforehand (i.e. with
controllerConn.CreateTopics(...)
), I still get theUnknown Topic Or Partition
.The problem seems to go away if I replace the dialer in the transport with a
*net.Dialer
so that instead of:I do:
Now I'm trying to figure out why the error comes back when I replace
dialer := &net.Dialer{}
withdialer := &kafka.Dialer{}
(which I need for the SASL and TLS helpers).If I cannot use a
*kafka.Dialer
in a*kafka.Writer
transport, then how am I supposed to connect a producer that uses SASL and/or TLS in an easy way?The text was updated successfully, but these errors were encountered: