-
Notifications
You must be signed in to change notification settings - Fork 17
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
Producer Not Terminating #25
Comments
Hi! That's the finalizer method and generally shouldn't be called directly. You want to terminate the actor directly: producer.terminate |
Also, by default the producer will wait for a confirmation of delivery on write. If you are pushing that many messages at once, it may be that you are looking for more of a "fire and forget". You can accomplish that by disabling the wait on response: Krakow::Producer.new(
:host => HOST,
...,
:connection_options => {
:options => {
:response_wait => 0
}
}
) You can also try looping through and doing single writes through the producer, or reducing the number of messages going through the mpub at one time (just smaller reducing the number you slice on iteration). |
Thanks @chrisroberts for the quick reply. Putting I'll dig through and see where the bottleneck is (maybe our nsqd instance?). For reference, without setting |
I added a test for large payload pushing via mpub based on your failing example. It may be an issue that you'll need to increase the response wait to allow for the nsqd to fully accept and respond confirmation of the receipt. If no response is provided (and the response_wait option is > 0) it will kick up an exception (which maybe is getting caught and suppressed some where in your use case?). Tests are all happy on various mri and jruby versions, so if you are still seeing issues after tweaking the options, please let me know and we can see if I can locally reproduce the behavior you're encountering. Cheers! |
I'm having an issue when I try to write payloads in increments. The simplest setup I could come up with was this:
When I do this, the output looks something like:
It will just hang and hang until I manually kill it from the terminal. It never reaches the loop the second time around (only 50k messages get pushed) and it never hits the
goodbye_my_love!
terminator. Any idea what I might be doing wrong?I'm on JRuby 1.7.19, using 0.3.12 of the gem.
The text was updated successfully, but these errors were encountered: