Ask Your Question

Revision history [back]

You most probably terminate your program immediately after calling pub.publish(msg) so that the publisher has no time to actually send the message. Could you show your code? The hacky solution is to simply wait a bit after sending, you could also check if the other node is listening with pub.getNumSubscribers().