Project

test_kafka

0.0
No commit activity in last 3 years
No release in over 3 years
Minimal Kafka runner suitable for integration testing
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 0.0.4
~> 10.1.0
~> 2.12.0
~> 1.9.2

Runtime

 Project Readme

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', '~> 0.1.1'

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.with_interruption do
  # broker temporarily stopped in this block
end

# broker is back up

cluster.stop

Requirements

  • Kafka 0.8 or higher