You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Synchronous send might stuck or crash when sending many messages #298
#include<pulsar/Client.h>usingnamespacepulsar;intmain(int argc, char* argv[]) {
Client client("pulsar://localhost:6650");
Producer producer;
Result result =
client.createProducer("persistent://public/default/my-topic", producer);
if (result != ResultOk) {
return -1;
}
// Send synchronouslyfor (int i = 0; i < 10000; i++) {
Message msg = MessageBuilder().setContent("content").build();
Result res = producer.send(msg);
if (res != ResultOk) {
std::cerr << "Failed to send " << i << res << std::endl;
break;
}
// NOTE: It might stuck, if we logged for each message, it would work well.if (i % 100 == 99) {
std::cout << std::time(nullptr) << "" << i << std::endl;
}
}
client.close();
return0;
}
Use C++ 17. You can use this project to reproduce.
changed the title [-][Bug] Send might stuck or crash when sending many messages[/-][+][Bug] Synchronous send might stuck or crash when sending many messages[/+]on Jul 3, 2023
Activity
[-][Bug] Send might stuck or crash when sending many messages[/-][+][Bug] Synchronous send might stuck or crash when sending many messages[/+]BewareMyPower commentedon Jul 3, 2023
Asynchronous send works well.
Reimplement Future and Promise correctly and simply
Fix the buggy Future and Promise implementations
Fix the buggy Future and Promise implementations
Fix the buggy Future and Promise implementations
Fix the buggy Future and Promise implementations (#299)
Fix apache#298
Revert "Fix apache#298"
Fix possible deadlock of Future when adding a listener after completed
Fix possible deadlock of Future when adding a listener after completed (