Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had my problem fixed. I used the second method that I discussed in my question( the one that says b).

From my understand the issue could be that no more messages/data was being available on that topic. Thus there was no data for the subscriber to trigger the callback.

Thus I simply check if the callback was called or not using a variable(global) before calling spinOnce and change the variable value inside the callback function, and after my spinOnce function i check the value of this variable.