Rufka: Ruby driver for Rafka

Rufka is a thin Ruby client for Rafka, providing a consumer and a producer with simple semantics. It is backed by redis-rb.

Status

Rufka is not yet stable and therefore is not recommended for production use.

Usage

Producer

prod = Rufka::Producer.new(host: "localhost", port: 6380)
prod.produce("greetings", "Hello there!") # produce to topic "greetings"

Consumer

cons = Rufka::Consumer.new(topic: "greetings", group: "myapp", id: "greeter1")
cons.consume # => "Hello there!"

# with a block
cons.consume { |msg| puts "Received: #{msg}" } # => "Hello there!"

Rafka::Consumer#consume automatically commits the offsets when the given block is executed without raising any exceptions.