Questions tagged [sarama]

sarama is a Golang client library for Apache Kafka.

Source code on GitHub: https://github.com/Shopify/sarama

97 questions
0
votes
1 answer

What is the proper way to read from the errors channel in Sarama?

I am using the Sarama library written in Go to read from an error channel when I produce a message. The overall code looks like this which is enclosed within a function: producer.AsyncProducer.Input() <- &sarama.ProducerMessage{Topic: topic, Key:…
Dikshant Adhikari
  • 664
  • 1
  • 10
  • 24
0
votes
1 answer

Apache Kafka consumer implemented in Golang panics when deployed to Docker

here is my attempt in implementing a simple microservice that is supposed to read messages from a kafka server and send it via HTTP. It works fine when i run it from the terminal, but when deployed on to docker it panics with panic: runtime error:…
0
votes
2 answers

How to notify consumer that new topic has been created in Kafka?

I am trying to get my consumer to dynamically update its consumption. Let me give you a more concrete example using animals. Imagine that I have a pet store, every topic is a type of animal (e.g. dogs, cats, fish). The primary responsibility of my…
mofury
  • 644
  • 1
  • 11
  • 23
0
votes
1 answer

Kafka 0.11 / Golang Sarama version support

I spent some time finding that my Go application connecting to a Kafka 0.11 cluster was using the old 0.8.2 version of the library, which is missing the Timestamp value in the response. I then found that Kafka 0.11.x API/version wasn't supported…
Prune
  • 345
  • 4
  • 11
-1
votes
1 answer

How does offset work when I have multiple topics on one partition in Kafka?

I am trying to develop a better understanding of how Kafka works. To keep things simple, currently I am running Kafka on one Zookeeper with 3 brokers and one partition with duplication factor of 3. I learned that, in general, it's better to have…
mofury
  • 644
  • 1
  • 11
  • 23
-2
votes
1 answer

Why my kafka cosumer group does not work?

I'm using sarama-cluster (written by Golang kafka consumer client) In broker, my topic's partition offset was 11000 and my consumer group's partition offset was 10100. Then I run my cluster-consumer, but nothing consume. (consume time was 1~2days…
1 2 3 4 5 6
7