static void Main(string[] args) { short PublisherPort = 12346; short SubscriberPort = PublisherPort; NetMQContext Context = NetMQContext.Create(); NetMQBeacon publisher = new NetMQBeacon(Context); publisher.Configure(PublisherPort); NetMQBeacon publisher2 = new NetMQBeacon(Context); publisher.Configure(PublisherPort); NetMQBeacon subscriber = new NetMQBeacon(Context); subscriber.Configure(SubscriberPort); subscriber.Subscribe(""); publisher.Publish("This is a message 1", TimeSpan.FromSeconds(2000)); // If the line below this is uncommented I get an error //publisher2.Publish("This is a message 2", TimeSpan.FromSeconds(2000)); string peerName = ""; while (true) { string received = subscriber.ReceiveString(out peerName); Console.WriteLine(received); } }