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

Sticky assignor seems not to be working #1493

Closed
grongor opened this issue Sep 16, 2019 · 3 comments
Closed

Sticky assignor seems not to be working #1493

grongor opened this issue Sep 16, 2019 · 3 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@grongor
Copy link
Contributor

grongor commented Sep 16, 2019

Versions
Sarama Kafka Go
master#2af3badd8c04 5.3.1-ccs (Confluent, Kafka version 2.3) 1.13
Configuration

Nothing special: newConfig() + clientID + correct KafkaVersion + sticky rebalance strategy

Problem Description

When I tried running and killing multiple consumers it seemed like the "sticky" strategy isn't working at all because the partitions were assigned randomly (didn't "stick" to the consumer where they were before).

So I tried to add some debugging code and it seems like the userData isn't persisted in the Kafka cluster - I can see the data encoded correctly after the rebalance, but when the next rebalancing is triggered, there are no userData received in the balance strategy (the byte array is empty).

Do I have wrong Kafka version, missing some config, ... or is something broken? I bet the issue is on my side but after 3 hours of investigating I was not able to find it.

@skidder
Copy link
Contributor

skidder commented Sep 25, 2019

Hello @grongor, sorry to hear you're having difficulty using the sticky partition assignor. Have you checked the consumer-group example?
https://github.com/Shopify/sarama/blob/master/examples/consumergroup/main.go

The sticky partition assignor can be enabled by running the consumer group example with the -assignor sticky flag. The description for my pull-request to add sticky partition assignor support shows how this works:
#1416

@skidder
Copy link
Contributor

skidder commented Sep 25, 2019

One more thing, I suggest changing the consumer-group name when altering the partition assignment strategy.

@ghost
Copy link

ghost commented Feb 21, 2020

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@ghost ghost added the stale Issues and pull requests without any recent activity label Feb 21, 2020
@ghost ghost closed this as completed Mar 22, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants