kafka-consumer-api

InstanceAlreadyExistsException coming from kafka consumer

偶尔善良 提交于 2019-12-24 03:01:12
问题 I am working with Kafka and trying to setup consumer group by follwing this article. The only difference is I have created my own abstract class, handler to make design simpler. Below is my abstract class: public abstract class Consumer implements Runnable { private final Properties consumerProps; private final String consumerName; public Consumer(String consumerName, Properties consumerProps) { this.consumerName = consumerName; this.consumerProps = consumerProps; } protected abstract void

Kafka topic viewer? [closed]

旧城冷巷雨未停 提交于 2019-12-24 01:54:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 months ago . I want to debug some Kafka topics so I know if the consumer or producer is at fault here. Is there a UI for Kafka where I can see what messages a topic contain? A dumper would also be nice so I can search for stuff on my own. 回答1: We use Landoop's Kafka Topics UI, which is pretty good. You can see topic

Kafka Mirror Maker : Sync __consumer_offsets topic duplicates

夙愿已清 提交于 2019-12-23 23:19:10
问题 Following to the solution mentioned here kafka-mirror-maker-failing-to-replicate-consumer-offset-topic. I was able to start mirror maker without any error across DC1(Live Kafka cluster) and DC2(Backup Kafka cluster) clusters. Looks like it is also able to sync __consumer_offsets topic across DC2 cluster form DC1 cluster. Issue If I close down consumer for DC1 and point same consumer(same group_id) to DC2 it reads the same messages again even though mirror maker is able sync offsets for this

Marking the coordinator dead for group(Kafka)

笑着哭i 提交于 2019-12-23 20:42:26
问题 One of my services stopped working a few hours ago. I have restarted the server but this consumer process just isn't registering with Kafka. This is what shows up when the consumer is started : 2017-04-21 10:22:54.887 INFO 18036 --- [afka-consumer-1] o.a.k.c.c.internals.ConsumerCoordinator : Revoking previously assigned partitions [] for group mysql-conversions-group 2017-04-21 10:22:54.890 INFO 18036 --- [afka-consumer-1] o.s.k.l.KafkaMessageListenerContainer : partitions revoked:[] 2017-04

We read data from brokers through multiple consumers using consumer group, but how the consumed data is combined?

时光毁灭记忆、已成空白 提交于 2019-12-23 18:15:40
问题 I need data from kafka brokers,but for fast access I am using multiple consumers with same group id known as consumer groups.But after reading by each consumer,how can we combine data from multiple consumers? Is there any logic? 回答1: By design, different consumers in the same consumer group process data independently from each other. (This behavior is what allows applications to scale well.) But after reading by each consumer,how can we combine data from multiple consumers? Is there any logic

How to achieve distributed processing and high availability simultaneously in Kafka?

情到浓时终转凉″ 提交于 2019-12-23 16:54:52
问题 I have a topic consisting of n partitions. To have distributed processing I create two processes running on different machines. They subscribe to the topic with same groupd id and allocate n/2 threads, each of which processes single stream(n/2 partitions per process). With this I will have achieved load distribution, but now if process 1 crashes, than process 2 cannot consume messages from partitions allocated to process 1, as it listened only on n/2 streams at the start. Or else, if I

Exception in thread “StreamThread-1” org.apache.kafka.streams.errors.StreamsException: Failed to rebalance

匆匆过客 提交于 2019-12-23 16:26:36
问题 I created a topic and i put a simple-producer to publish some message in that topic bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic streams-file-input bin/kafka-console-producer.sh --broker-list localhost:9092 --streams-file-input I am running the below simple example in kafka streams and i got a weird exception which i cannot handle Properties props = new Properties(); props.put(StreamsConfig.APPLICATION_ID_CONFIG, "streams-pipe"); props

Does kafka have any default web UI [closed]

眉间皱痕 提交于 2019-12-23 11:21:03
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 months ago . I have a couple questions in Kafka. 1) Does Kafka have a default web UI? 2) How can we gracefully shutdown a standalone kafka server, kafka console- consumer/console-producer. Any solutions will be highly appreciated. Thank you. 回答1: 1) No Kafka does not have a default UI. There

How to stop Python Kafka Consumer in program?

陌路散爱 提交于 2019-12-23 09:18:12
问题 I am doing Python Kafka consumer (trying to use kafka.consumer.SimpleConsumer or kafka.consumer.simple.SimpleConsumer in http://kafka-python.readthedocs.org/en/latest/apidoc/kafka.consumer.html). When I run the following piece of code, it will run all the time, even if all messages consumed. I hope the consumer will stop if it consume all the messages. How to do it? Also I have no idea how to use stop() function (which is in base class kafka.consumer.base.Consumer). UPDATE I used signal

Kafka 0.10 quickstart: consumer fails when “primary” broker is brought down

社会主义新天地 提交于 2019-12-22 18:36:10
问题 So I'm trying the kafka quickstart as per the main documentation. Got the multi-cluster example all setup and test per the instructions and it works. For example, bringing down one broker and the producer and consumer can still send and receive. However, as per the example, we setup 3 brokers and we bring down broker 2 (with broker id = 1). Now if I bring up all brokers again, but I bring down broker 1 (with broker id = 0), the consumer just hangs. This only happens with broker 1 (id = 0),