When running rake spec:integration with /fixtures/integration.yml
Hermann::Lib::Producer #connect should connect
Failure/Error: subject(:producer) { Hermann::Lib::Producer.new(brokers) }
TypeError: no implicit conversion of Array into String
# ./spec/hermann_lib/producer_spec.rb:10:in `initialize'
[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)>
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
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
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