Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition Rebalancing #1480

Closed
chenhengqi opened this issue Sep 5, 2019 · 3 comments
Closed

Partition Rebalancing #1480

chenhengqi opened this issue Sep 5, 2019 · 3 comments

Comments

@chenhengqi
Copy link

chenhengqi commented Sep 5, 2019

Versions

Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.

Sarama Kafka Go
v1.23.1 0.10.21 1.11.5
Configuration

What configuration values are you using for Sarama and Kafka?

c := sarama.NewConfig()
c.Consumer.Return.Errors = true
c.Consumer.Offsets.Initial = sarama.OffsetOldest
c.Version = sarama.V0_10_2_1
Logs

When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set sarama.Logger to a log.Logger to capture Sarama debug
output.

logs: CLICK ME

// producer
[sarama] 2019/09/05 16:57:21 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[sarama] 2019/09/05 16:57:21 producer/broker/10356 starting up
[sarama] 2019/09/05 16:57:21 producer/broker/10356 state change to [open] on partition-test-log/0
[sarama] 2019/09/05 16:57:21 Connected to broker at 9.1.0.28:9094 (registered as #10356)
[sarama] 2019/09/05 17:07:21 client/metadata fetching metadata for all topics from broker 9.1.0.28:9092
[sarama] 2019/09/05 17:07:21 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[sarama] 2019/09/05 17:07:21 producer/broker/10353 starting up
[sarama] 2019/09/05 17:07:21 producer/broker/10353 state change to [open] on partition-test-log/1
[sarama] 2019/09/05 17:07:21 Connected to broker at 9.1.0.28:9093 (registered as #10353)

// consumer
[sarama] 2019/09/05 16:56:38 client/metadata fetching metadata for [partition-test-log] from broker 9.1.0.28:9092
[sarama] 2019/09/05 16:56:38 client/metadata fetching metadata for [partition-test-log] from broker 9.1.0.28:9092
[sarama] 2019/09/05 16:56:38 client/coordinator requesting coordinator for consumergroup partition-test-group from 9.1.0.28:9092
[sarama] 2019/09/05 16:56:38 client/coordinator requesting coordinator for consumergroup partition-test-group from 9.1.0.28:9092
[sarama] 2019/09/05 16:56:38 client/coordinator coordinator for consumergroup partition-test-group is #10356 (9.1.0.28:9094)
[sarama] 2019/09/05 16:56:38 client/coordinator coordinator for consumergroup partition-test-group is #10356 (9.1.0.28:9094)
[sarama] 2019/09/05 16:56:38 Connected to broker at 9.1.0.28:9094 (registered as #10356)
[sarama] 2019/09/05 16:56:38 Connected to broker at 9.1.0.28:9094 (registered as #10356)
[sarama] 2019/09/05 16:56:40 client/coordinator requesting coordinator for consumergroup partition-test-group from 9.1.0.28:9092
[sarama] 2019/09/05 16:56:40 client/coordinator coordinator for consumergroup partition-test-group is #10356 (9.1.0.28:9094)
[sarama] 2019/09/05 16:56:40 consumer/broker/10356 added subscription to partition-test-log/0
[sarama] 2019/09/05 17:06:38 client/metadata fetching metadata for all topics from broker 9.1.0.28:9092
[sarama] 2019/09/05 17:06:38 client/metadata fetching metadata for all topics from broker 9.1.0.28:9092

Problem Description

When I add a new partition to the topic that I am consuming, the consumer do NOT exit ConsumeClaim ASAP.

The messages in new partition stay in Kafka.

Is there a way to consume messages in new partition without restarting the consumer ?

I believe these issues #1237 #1462 #1471 are related.

@chenhengqi
Copy link
Author

ping @d1egoaz

@antsbean
Copy link
Contributor

I had commited PR to try fix this problem, please see #1525

@chenhengqi
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants