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

Add missing methods to support incremental rebalance #541

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

ikeberlein
Copy link
Contributor

@ikeberlein ikeberlein commented Jun 6, 2023

::incrementalAssign() and ::incrementalUnassign() consumer methods are used in rebalance callback instead of ::assign() when cooperative-sticky partition assignment strategy in charge.

@ikeberlein ikeberlein marked this pull request as ready for review June 6, 2023 14:54
Copy link
Owner

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Sorry for the late review. This looks good to me appart from one comment.

kafka_consumer.c Outdated
Comment on lines 252 to 256
/* {{{ proto void RdKafka\KafkaConsumer::incrementalAssign(array $topics)
Incremental assignment of partitions to consume */
PHP_METHOD(RdKafka_KafkaConsumer, incrementalAssign)
{
#if RD_KAFKA_VERSION >= 0x010600ff
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this so that the methods do not exist if the librdkafka version is not compatible. The stub files support #if/#ifdef as well.

Also, please use a feature test macro so that you do not need to rely on the version number (see here and here).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Arnaud and thank you too :)
did as you said

@ikeberlein ikeberlein force-pushed the FeatureAddInrcOps branch 2 times, most recently from 770ba92 to c76c74b Compare January 12, 2024 09:08
@arnaud-lb arnaud-lb merged commit 4b085d2 into arnaud-lb:6.x Aug 30, 2024
53 checks passed
@arnaud-lb
Copy link
Owner

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants