I have some messages already send to kafka using the producer perf test
tool, but when I fire up irb I don't see any messages:
c = Kafka::Consumer.new(:topic => "test")
m1 = c.consume
So it says it is empty.
If I create a loop like:
c.loop do |msg|
And then I run the producer perf test, I see the messages outputted.
So it seems I am missing something, why does't it return any messages when
I simply connect and their are messages already in the system, or does
connecting to a specific topic push the offset to the end of the queue?
Now if I create a consumer, and then create a producer and send a message,
then when I call consumer.consume I get a message.
When I cat the /tmp/kafka-logs/test-0/000000...000.kafka file, I can see my
message and it seems to be in string format like:
Shouldn't it be encoded?