1.9.3 seems like it should actually still be using the
rb_thread_blocking_region() call, as ...call_without_gvl() isn't defined
in any header (although it is available).
Consuming that implicit declaration was causing crashes.
it's not safe to simply pluck strings off the heap unless we were also
going to maintain a reference to them. sidestep this problem by
strdup'ing the topic and brokers strings
this allows threaded code on modern (>=2.0) rubies working. Also,
switch to the single-message form of the rd_kafka call -- the callback
form isn't safe to run without the GVL held, as it enters the ruby
interpreter in rb_yield().
This commit also moves tests back out of the platform specific scope and makes
the internal #push_single API more consistent to alllow easier testing.
Fixes#49
This commit also fixes a memory leak with the JRuby version of the gem where we
were not properly cleaning up children objects and holding onto references of
them forever
Fixes#46
This reduces the need for the librdkafka system dependency and results in
statically linking librdkafka.a against the C extension.
There's a few hacks in extconf.rb specifically to deal with librdkafka's build
system, as well as apply checksumming to the downloaded file
Fixes#8
Provided that Producer#tick_reactor has been invoked, if there are underlying
errors like "1/1 Brokers down" then this code will ensure that outstanding
Herman::Result children of Herman::Producer will have their error status updated.
Fixes#25
This adds a requirement for 1.8.7 clients to install the SystemTimer gem for
timing out on Hermann::Result#value(timeout) to block and timeout correctly
Fixes#25
Provided that /something/ is ticking the librdkafka reactor underneath, the
Hermann::Result will be updated with the message delivery status when that's
completed.
What's still missing is producer level error calbacks
Fixes#11Fixes#15Fixes#17
This approach to shuffling the message buffer into librdkafka relies on librdkafka to safely
copy the buffer for it's own uses from the Ruby string's C pointer.
This has been tested with buffers 2x the size of the SIGSEGV mentioned in #21Fixes#21Fixes#13
This should be enough to get some initial review of the API going. Hooking up a
Hermann::Result class to the Hermann::Producer in Ruby is in this commit but
actually driving the librdkafka reactor underneath is not yet hooked up.
Fixes#11Fixes#15Fixes#18