zeromq / netmq

A 100% native C# implementation of ZeroMQ for .NET
Other
2.94k stars 742 forks source link

Managing Dynamic Port Consumption in NetMQ for Efficient Pub/Sub Applications #1103

Open kais123456789 opened 2 weeks ago

kais123456789 commented 2 weeks ago

NetMQ Version: last version Operating System: win 2019 .NET Version: net 6

I'm using NetMQ to build an application based on the Pub/Sub design pattern. When I run the publisher on a specific port and connect to it with the subscriber, I've noticed that ZMQ is consuming more than 50 dynamic ports. After running multiple instances of my application, I've exhausted all the available dynamic ports on my machine, leading to an "address in use" exception.

Is there a way to limit the number of ports used by ZMQ?