Open DittoWii opened 6 months ago
and I found that sometimes it works, but sometimes not, am I using it wrong?
I believe you have your application crashing with core dump because of uncaught kafka::Exception
.
As for _pendingEvent
, from code I see:
event.reset()
- https://github.com/morganstanley/modern-cpp-kafka/blob/main/include/kafka/KafkaConsumer.h#L920
3.2. or nothing happened during poll and you continue with exceptionWhat do you use for test purposes? Kafka container? Something in cloud? Mock cluster from librdkafka?
I am running a simple example using
_example_KafkaConsumer_Simple
andexample_KafkaProducer_Simple
, the latter works perfectly, but it seems that the consumer can never subscribe correctly.In function
KafkaConsumer::subscribe
inKafkaConsumer.h
, I'm confused about the value of the variable_pendingEvent
. So I use dbg, and found that the value of!_pendingEvent
in line503 seems uncorrect, soKAFKA_API_DO_LOG(Log::Level::Notice, "subscribed, topics[%s]", topicsStr.c_str());
will never be executed, and the functionKafkaConsumer::subscribe
will never return, causing core dumped evetually. So is this my problem or .... Looking forward to your reply.