Closed faust21 closed 1 year ago
In your example your publisher is connecting to the XSubscriberSocket which by default connects to the port(not bind), since you have not specified bind in you connection string it will not work. So changing string subServer = "tcp://localhost:15556"; to string subServer = "@tcp://localhost:15556";
will make you code work, in general I like to be explicit about bind connect, and not rely on the underlying implementation.
Environment
Expected behaviour
Subscriber will receive the messages.
Actual behaviour
Subscriber haven't received the messages.
Steps to reproduce the behaviour
the xpub-xsub's codes:
publisher's codes:
subscriber's code: