-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
2.0 #106
Conversation
poc.rb
Outdated
producer.flush_async | ||
|
||
producer.buffer_many(Array.new(10) { msg }) | ||
producer.flush_sync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really love this idea with buffer! 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API will slightly change tomorrow but that's not a big change (will ping you).
poc.rb
Outdated
@@ -0,0 +1,38 @@ | |||
require 'waterdrop' | |||
|
|||
producer = WaterDrop::Producer.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about adding ability to also put config into constructor of producer? and use #setup
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean this?
producer = WaterDrop::Producer.new do |config|
# trolololo
end
We can do that BUT we need to indicate, that this needs to run after fork.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, something like this. or producer = WaterDrop::Producer.new({ ... })
if block harder in implementation 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already in the 2.0 branch
producer = WaterDrop::Producer.new do |config|
config.kafka = {
'bootstrap.servers' => 'localhost:9092',
'request.required.acks' => [-1, 1].sample
}
end
@davydovanton could you go through the new |
* better stats reporting * remarks and docs * remove non-existing examples reference * remarks
…h data in the process (#135) * add finalization hooks to producers to close them before GC kicks in
Ok. Time to merge this and move on! |
@nijikon feel free to remove this branch once we've managed to upgrade our internal references. |
WaterDrop 2.0 based on https://github.com/edenhill/librdkafka instead of ruby-kafka. Provides instantiable API as well as many additional features. Please see README for more details.