Commit Graph

71 Commits

Author SHA1 Message Date
jway e91d42b7fe move jruby deps into platform java 2015-05-06 20:24:56 -07:00
Ben Osheroff 8832ad28fd update rdoc section with :offset documentation 2015-04-28 11:52:16 -07:00
Ben Osheroff 8e89b75801 add a type to the invalid offset error 2015-04-28 11:50:28 -07:00
Ben Osheroff 752123b83e allow choosing of an inital offset in the MRI consumer 2015-04-28 10:17:09 -07:00
Ben Osheroff 71c21d327e delete options in Consumer#initialize before passing along 2015-04-27 10:12:31 -07:00
Ben Osheroff 6db14ceeb7 version 0.23.0 2015-04-27 09:54:02 -07:00
Ben Osheroff 3792ee206b unify jruby/mri Consumer#initialize
While we do require different options between jruby & mri, there is a
common "topic" option.  The rest we pass in the options hash.
2015-04-27 09:32:16 -07:00
R. Tyler Croy f3f23965bd Bump a minor version for an API addition 2015-04-06 17:42:49 -07:00
Lee Butterman f059643efc Add support for a partition key for producers.
Fixes lookout/Hermann#88
2015-04-06 17:35:38 -07:00
jway 96c0a74bf5 0.20.4 add large file support, fix bug passing options 2015-04-04 11:47:29 -07:00
Dirk Koehler 3b03658220 Bring back Jarfile and remove curator from dependency 2015-03-27 17:25:31 -07:00
Dirk Koehler 70f52204c7 Upgrade version to 0.20.3 2015-03-26 23:06:15 -07:00
Dirk Koehler 163c9d70c6 Cleanup jar dependencies
- move Jarfile dependency into gemspec
- upgrade curator to 2.7.1
- fix tests
- remove transient dependencies
2015-03-26 22:58:13 -07:00
R. Tyler Croy 5f783476f8 Bump to 0.20.2 for release 2015-02-23 15:03:07 -08:00
Marc Seeger b7c35cb78c Fix MRI documentation in consumer.rb 2014-12-14 21:06:11 -05:00
R. Tyler Croy aeaec0269c Merge pull request #76 from rtyler/issues/75-native-zookeeper
Implement a Java-native Zookeeper interface with Curator
2014-11-21 21:01:24 -08:00
R. Tyler Croy 495ac2687a Refactor out the block support from #each_brokers and bring back `timeout` for the ZkGemImpl
[1] pry(main)> d = Hermann::Discovery::Zookeeper.new('zk0.REDACTED.com:2181')
    => #<Hermann::Discovery::Zookeeper:0x57186526
     @impl=
      #<Hermann::Discovery::Zookeeper::CuratorImpl:0x391d1e33
       @curator=
        #<Java::OrgApacheCuratorFrameworkImps::CuratorFrameworkImpl:0x5287ba5f>>,
     @zookeepers="zk0.REDACTED.com:2181">
    [2] pry(main)> d.get_brokers
    log4j:WARN No appenders could be found for logger (org.apache.curator.framework.imps.CuratorFrameworkImpl).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    => ["kafka0.REDACTED.com:6667",
     "kafka1.REDACTED.com:6667"]
    [3] pry(main)>

    [1] pry(main)> d = Hermann::Discovery::Zookeeper.new('zk0.REDACTED.com:2181')
    => #<Hermann::Discovery::Zookeeper:0x7b6141f0
     @impl=
      #<Hermann::Discovery::Zookeeper::ZkGemImpl:0x4fb64a52
       @zookeepers="zk0.REDACTED.com:2181">,
     @zookeepers="zk0.REDACTED.com:2181">
    [2] pry(main)> d.get_brokers
    log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    => ["kafka0.REDACTED.com:6667",
     "kafka1.REDACTED.com:6667"]
    [3] pry(main)>
2014-11-21 20:39:11 -08:00
R. Tyler Croy 136e0ace47 Add suppot for optionally using Curator if it's on the classpath for broker discovery
This change makes the loading of the 'zk' gem optional and implicit, as well as
the reliance on Curator being available in the JRuby runtime's classpath.

If neither Zookeeper client implementation are available, an exception will be
raised when attmepting to use Zookeeper-based discovery

Fixes #75
2014-11-21 18:06:56 -08:00
R. Tyler Croy 8ed1ba91ba Merge pull request #74 from lookout/add-errors
include errors file
2014-11-17 17:09:47 -08:00
jway b4699845c5 include errors file 2014-11-17 17:01:44 -08:00
jway 6300705af9 fixup exception handling in consumer 2014-11-13 16:23:40 -08:00
R. Tyler Croy c6ab5e760c Force a more recent version of log4j as a jar dependency
The log4j has distributed some bad packages in the past but this release looks
safe to include
2014-11-12 08:53:44 -08:00
R. Tyler Croy d89d17119b Jump up to 0.20 2014-10-31 12:25:46 -07:00
R. Tyler Croy 0f7714175b Correct test failures with the API changes to Hermann exceptions and some underlying expectations 2014-10-31 12:02:17 -07:00
R. Tyler Croy f2ceab296c Properly marshal bytes in and out of the Kafka client library
The primary issue with marshalling bytes back and forth previously was the use
of the StringEncoder class. By default the Kafka client library uses the
DefaultEncoder which is a no-op and simply allwos byte arrays through
2014-10-31 11:32:49 -07:00
R. Tyler Croy 61c0426cbe Catch all Java related exceptions and raise them up out of Hermann::Producer#push_single 2014-10-31 11:24:11 -07:00
R. Tyler Croy 3c9c234c43 Update the Hermann::Discovery::Zookeeper API to return an Array of brokers more suitable for Hermann::Producer 2014-10-30 10:05:34 -07:00
jway 132dbb94a9 pass string to JavaProducer 2014-10-29 16:59:34 -07:00
R. Tyler Croy c3f5744568 Bump the version for 0.19 milestone 2014-10-28 20:50:13 -07:00
R. Tyler Croy d2ef453494 Tick the underlying librdkafka reactor on each subsequent Hermann::Producer#push call
References #48
2014-10-28 20:47:25 -07:00
R. Tyler Croy 4ea21d5add Account for a subtle internal API change between the C and Java Producers 2014-10-28 18:18:05 -07:00
R. Tyler Croy 433b739e45 Add a small note about consumer thread-safety 2014-10-28 18:14:43 -07:00
R. Tyler Croy 6cbceead8b Wrap the brokers array in a threadsafe array
References #50
2014-10-28 18:13:20 -07:00
R. Tyler Croy 7e8fbca79e Add thread_safe for handling the @children inside of Hermann::Producer
This isn't comprehensive, still debating a comprehensive approach to #50 that
I'm happy with

References #50
2014-10-28 18:00:29 -07:00
jway 9acce0a64b add shutdown
* producer/consumer integration tests
2014-10-27 21:16:17 -07:00
jway 5e0079ce05 allow passing topic into consume method 2014-10-25 09:12:47 -07:00
R. Tyler Croy 8c01040f5d Wrap calls to the underlying Java producer with some Ruby-based exception handling
Fixes #58
2014-10-24 11:47:51 -07:00
jway 972fe47410 add simple java consumer 2014-10-24 10:07:27 -07:00
R. Tyler Croy e0070b942b Properly reap children in tests on MRI and Java
Fixes #54
2014-10-15 12:21:29 -07:00
jway 63c64f8ea3 add reaping of java promises 2014-10-15 11:32:51 -07:00
R. Tyler Croy 2c1494a18e Make jar-dependencies a non-runtime dependency 2014-10-14 15:57:20 -07:00
jway 9ca7340b21 allow user to pass in opts 2014-10-14 15:17:54 -07:00
R. Tyler Croy 249f2739a7 Properly propagate the optionally passed in topic on #push when recursing through Arrays
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
2014-10-14 10:54:52 -07:00
R. Tyler Croy b0d3bbffe3 Avoid adding non-existent children to our internal list.
This really only affects testing where we might be returning nil after a
push_single expectation has been met
2014-10-14 10:19:10 -07:00
R. Tyler Croy 5b6fa5075f Support passing in a topic for every #push in MRI
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
2014-10-14 09:51:24 -07:00
jway a6a1148221 allow java producer push to change topics 2014-10-13 15:17:10 -07:00
jway cd16650ad7 refactor zookeeper lookup into Discovery class 2014-10-10 11:12:22 -07:00
jway 354fbde7fa add zookeeper broker lookup to Java provider 2014-10-08 15:25:32 -07:00
R. Tyler Croy 4cfb92b697 Clean up the execution of RSpecs to run the platform-specific tests in the right place 2014-10-08 09:45:07 -07:00
jway 3151b3ef4b push method returns executing Promise 2014-10-07 15:27:36 -07:00