TestKafka
Minimal Kafka 0.8 runner suitable for integration testing.
Adapted from the excellent poseidon's integration tests.
Installation
Add TestKafka to your application's Gemfile:
gem 'test_kafka'
and bundle:
$ bundle
Usage
require 'test_kafka'
cluster = TestKafka.start('/usr/local/kafka')
# or specify custom a temp directory and kafka/zk ports:
# cluster = TestKafka.start('/usr/local/kafka', '/tmp', 9092, 2181)
# ... interact with Kafka/ZK ...
cluster.stop
Requirements
- Kafka 0.8 or higher