-
Notifications
You must be signed in to change notification settings - Fork 9
create a kafka package #135
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
Comments
cc @smoya, @jose-ledesma, @mraerino, @pandemicsyn who did those implementations |
I really liked most of the https://github.com/segmentio/kafka-go lib a thing to look out for is that their
most likely separate calls to I think a good constructor and a thin wrapper around the library should work well for the start. |
Assuming we can sort out a nice way to handle configs - I'd be fine potentially exposing the underlying kafka lib directly since others might be doing more advanced stuff, but so far my use case has been very straight forward. I've gotten away with just using the segment packages vanilla kafka.Reader implementation.
I only have real word exposure to https://github.com/segmentio/kafka-go (now) and https://github.com/confluentinc/confluent-kafka-go (in the past). I didn't have any issues with confluents driver - but I know that dependency on librdkafka is a no-go for some folks. I think its worth noting though that segment driver isn't without issues (like that time_wait bug) and is definitely still under going development. 4.0 is reworking some big parts (segmentio/kafka-go#438 , segmentio/kafka-go#461) and it still occasionally has issues (https://github.com/segmentio/kafka-go/issues?q=is%3Aissue+is%3Aclosed) but I generally liked it and be down for taking the chance on it.
+1 What @mraerino said ;) I think support for emitting background kafka stats from the segment driver (like we do for mysql in metriks) would definitely be nice too. |
Also just wanna expand on why I like defaulting and rolling with separate Fetch/Commit's as our recommended way. Basically, at a previous gig we defaulted to auto commit in the package setup - and most folks would implement their own separate Fetch/Commit pattern like @mraerino mentioned. But as the company grew, and others at the co starting using it who where not as familiar with Kafka it sometimes led to implementation pain for them after they'd gone live (i was one of those folks). Forcing folks to think through their fetch/commit strategy is good. |
When I was looking for kafka libraries, the first I thought about was the confluent one. But using c-bindings may make it hard for local environments, and it may be a bit cumbersome to dockerize it (what is the docker from? the golang one and configure the Confluent repository, and then maybe the golang debian changes and it breaks librdkafka? start from the ubuntu one and install golang on it?) When I looked to the pure go implementations, the segmentio one seemed the more mature (although it is still in development) Agree with everything said so far by @mraerino and @pandemicsyn |
yeah I'm in alignment with the team:
|
I think our team will retract that statement. @smoya is evaluating https://github.com/Shopify/sarama and https://github.com/confluentinc/confluent-kafka-go |
FYI, we are now using https://github.com/confluentinc/confluent-kafka-go and it fixed all the issues we had. There is some basic work pending around error handling in order to have something deliverable that can be shared across the org. This will happen very soon (I would like next week). |
Ok we have 3 projects that are doing kafka each slightly differently:
They all have slightly different interfaces and abstractions. I'd love to get some opinions about how we should standardize some of this.
At a minimum, I'd like to have configuration structs/opts that can be used to establish a connection. It should handle:
Here are some question I have:
What are your questions? Got some ideas for what it should/nt cover?
The text was updated successfully, but these errors were encountered: