-
-
Notifications
You must be signed in to change notification settings - Fork 265
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 getControllerId #554
Add getControllerId #554
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -542,7 +542,7 @@ PHP_METHOD(RdKafka_KafkaConsumer, close) | |||||||||||||||||||||||
} | ||||||||||||||||||||||||
/* }}} */ | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
/* {{{ proto Metadata RdKafka\KafkaConsumer::getMetadata(bool all_topics, RdKafka\Topic only_topic, int timeout_ms) | ||||||||||||||||||||||||
/* {{{ proto RdKafka\Metadata RdKafka\KafkaConsumer::getMetadata(bool $all_topics, RdKafka\Topic $only_topic, int $timeout_ms) | ||||||||||||||||||||||||
Request Metadata from broker */ | ||||||||||||||||||||||||
PHP_METHOD(RdKafka_KafkaConsumer, getMetadata) | ||||||||||||||||||||||||
{ | ||||||||||||||||||||||||
|
@@ -581,6 +581,28 @@ PHP_METHOD(RdKafka_KafkaConsumer, getMetadata) | |||||||||||||||||||||||
} | ||||||||||||||||||||||||
/* }}} */ | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
#ifdef HAS_RD_KAFKA_CONTROLLERID | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Then update the test SKIPIF section to check if the method exists. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've improved Lines 74 to 82 in 015b7a2
|
||||||||||||||||||||||||
/* {{{ proto int RdKafka\KafkaConsumer::getControllerId(int $timeout_ms) | ||||||||||||||||||||||||
Returns the current ControllerId (controller broker id) as reported in broker metadata */ | ||||||||||||||||||||||||
PHP_METHOD(RdKafka_KafkaConsumer, getControllerId) | ||||||||||||||||||||||||
{ | ||||||||||||||||||||||||
object_intern *intern; | ||||||||||||||||||||||||
zend_long timeout; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &timeout) == FAILURE) { | ||||||||||||||||||||||||
return; | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
intern = get_object(getThis()); | ||||||||||||||||||||||||
if (!intern) { | ||||||||||||||||||||||||
return; | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
RETURN_LONG(rd_kafka_controllerid(intern->rk, timeout)); | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
/* }}} */ | ||||||||||||||||||||||||
#endif | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
/* {{{ proto RdKafka\KafkaConsumerTopic RdKafka\KafkaConsumer::newTopic(string $topic) | ||||||||||||||||||||||||
Returns a RdKafka\KafkaConsumerTopic object */ | ||||||||||||||||||||||||
PHP_METHOD(RdKafka_KafkaConsumer, newTopic) | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a fixed version here, otherwise the CI may break independently of changes made in this repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the thing is wurstmeister/zookeeper only exists with 3.4.6 and latest tags, and 3.4.6 tag seems broken for 2 months