Call to undefined method RdKafka\KafkaConsumer::oauthbearerSetToken()
Description
The following code:
<?php
$conf->setOauthbearerTokenRefreshCb(function ($consumer) {
$token = $someCorrectTokenValue;
$consumer->oauthbearerSetToken($token, $tokenExpiry, 'principalClaimName=azp');
});
Resulted in this output:
Call to undefined method RdKafka\KafkaConsumer::oauthbearerSetToken()
But I expected that I can set an OAUTHBEARER token to the consumer.
Am I doing something wrong or is this not supported? As the same code works perfectly for the producer side.
php-rdkafka Version
php-rdkafka 6.0.5
librdkafka Version
No response
PHP Version
PHP 8.4
Operating System
No response
Kafka Version
No response
I had the same issue. It seems to me that it's not supported for high-level consumers, but it does work for low-level consumers. Please correct me if I'm wrong
I've seen your other comment saying that, and I double-checked, and I think you are correct.
With the legacy low-level consumer it is possible and it works, but then other functionality of the high-level consumer is lost.
I believe that the low-level consumer is outdated and should no longer be used. We should focus on using the high-level consumer instead. So, why are we still including the low-level consumer in this case?