Skip to content

inconsistent parameter of mdLifetime #234

@leiwang008

Description

@leiwang008

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;
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions