We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the solution you would like
Defining a new writer should preferably have an option for setting dialer.
w := &kafka.Writer{Dialer: dialer, ...}
Alt. have a helper when defining Dial in Transport.
Dial
A clear and concise description of what you want to happen.
Currently you have to define a Dial function that handles Lookup in the Transport. This doesn't seem optimal.
tr := &kafka.Transport{dial: MyFunc(dialer), ...}
This is the current implementation in NewWriter().
NewWriter()
dial := func(ctx context.Context, network, addr string) (net.Conn, error) { start := time.Now() defer func() { stats.dials.observe(1) stats.dialTime.observe(int64(time.Since(start))) }() address, err := lookupHost(ctx, addr, resolver) if err != nil { return nil, err } return dialer.DialContext(ctx, network, address) }
Supporting documentation
Please provides links to relevant Kafka protocol docs and/or KIPs.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the solution you would like
Defining a new writer should preferably have an option for setting dialer.
w := &kafka.Writer{Dialer: dialer, ...}
Alt. have a helper when defining
Dial
in Transport.Currently you have to define a Dial function that handles Lookup in the Transport. This doesn't seem optimal.
tr := &kafka.Transport{dial: MyFunc(dialer), ...}
This is the current implementation in
NewWriter()
.Supporting documentation
The text was updated successfully, but these errors were encountered: