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

CPPKafka crashes when trying to create a configuration in Windows #310

Open
ksohan opened this issue Aug 11, 2023 · 0 comments
Open

CPPKafka crashes when trying to create a configuration in Windows #310

ksohan opened this issue Aug 11, 2023 · 0 comments

Comments

@ksohan
Copy link

ksohan commented Aug 11, 2023

I have built the CPPKafka using vcpkg and when I tried the following simple code, it is crashing while trying to create the configuration.

Configuration config = {
    { "metadata.broker.list", "127.0.0.1:9092" }
};
std::cout << "Hello\n";

// Create the producer
//std::cout << "77777777777\n";
Producer producer(config);

std::cout << "Config read\n";

// Produce a message!
std::string message = "hey there!";
producer.produce(MessageBuilder("my_topic").partition(0).payload(message));
producer.flush();
//std::cout << "Message flushed\n";

The trace goes to this line:
if (_Count > max_size()) { _Xlen_string(); // result too long }

If I use only Configuration config;, it doesn't crash.

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