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
I want to know correct way to detect network issues while polling messages from consumer. I noticed that when network had issue consumer keeps returning null message. Also when there is no message on server side, it is returning null message too. So it is not possible whether it is network issue or no message. I have following code.
while (true) {
Message msg = consumer.poll();
if (!msg) {
** This condition is executed when there is no message or network has issues**
continue;
}
if (msg.get_error()) {
if (!msg.is_eof()) {
}
continue;
}
cout << "Received message" << msg.get_payload() << endl;
}
The text was updated successfully, but these errors were encountered:
rajdippatel-emc
changed the title
Detect network issue
Detect network issue or no message scenario
Feb 26, 2021
Hello,
I want to know correct way to detect network issues while polling messages from consumer. I noticed that when network had issue consumer keeps returning null message. Also when there is no message on server side, it is returning null message too. So it is not possible whether it is network issue or no message. I have following code.
The text was updated successfully, but these errors were encountered: