Skip to content

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

Description

@ksohan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions