Hide Forgot
It would be helpful if we could specify the local IP and port that a client uses when connecting to a broker. For example, if my client machine has the IPs 192.168.0.1 and 10.0.0.1, I would like to be able to choose which IP and specify a particular port to use, e.g. 192.168.0.1 port 9999 or 10.0.0.1 port 7777. There could potentially be options that could be given to the Connection such as localInterface and localPort to accomplish this. If localInterface is not given, continue to function as currently implemented. If localPort is not given, continue to function as currently implemented.
Can you describe the usecase for this enhancement?
Our QA team needs to be able to block access to a particular client at the TCP/IP level (to simulate a connection loss by the client). The easiest way we could think of to do this was to know the client's local port and eventually block it.
As a workaround, are you able to turn on logging of the client's allocated port and then use that to block access?
That really wouldn't work for our QA efforts. We need to know the port that will be used prior to any connection attempt, so as to be able to control whether or not the connection attempt will be successful. Also, in order for the workaround suggested to be viable, the port the client uses upon reconnects would need to be the same port all the time.