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

inconsistent parameter of mdLifetime #234

Open
leiwang008 opened this issue Jun 21, 2024 · 0 comments
Open

inconsistent parameter of mdLifetime #234

leiwang008 opened this issue Jun 21, 2024 · 0 comments

Comments

@leiwang008
Copy link

leiwang008 commented Jun 21, 2024

In the file KafkaClient.h at line

if (rd_kafka_oauthbearer_set_token(rk,
, we are calling the function rd_kafka_oauthbearer_set_token of rdkafa library
https://github.com/confluentinc/librdkafka/blob/0e3128c69a2faec988850da8e78ea077a3fc3019/src/rdkafka.h#L9899

the md_lifetime_ms is in millisecond, but the parameter SaslOauthbearerToken we pass in is microseconds, it is in

std::chrono::microseconds mdLifetime{};

We should probably change mdLifetime's type to std::chrono::milliseconds as below

struct SaslOauthbearerToken
    {
        using KeyValuePairs = std::map<std::string, std::string>;

        std::string               value;
        std::chrono::milliseconds mdLifetime{};
        std::string               mdPrincipalName;
        KeyValuePairs             extensions;
    };
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

1 participant