What do you mean exactly by local HornetQ and master HornetQ? Are these a live node and a backup node? Or both live nodes in a cluster?
If you are talking about 2 live nodes in a cluster, they behave the same: a local port where they are available (like localserver:5445). In case they connect to another cluster member they start a connection to the remote machine (remoteserver:5445) and bind to a local port (like localserver:52000).
They are neither.
One is a local hornetQ broker with tasked with updating the local frontends. The other is a 'master' broker instance that is responsible for routing logic between local brokers (using a series of diverts and local forward queues)
They are connected via a bridge,
It is precisely the binding to the local port that I would like to control. Looking through the netty source code, there seems to be 'options' for this defined at that level , but not exposed by hornetq
currently its not possible to set the local port altho we could easily add it. I'm not sure how valid it is tho as this would be configurable on the server side and would be used by all clients, firstly only 1 client from a machine would be able to connect at any one time and an assumption would be made that any other clients on other machines would have this port free.
If you want it raise a jira and we'll take a look sometime, even better attach a patch to the jira for the fix.
Ok, agreed , there would not be much point for client side, but we may have a use-case here for the special case of broker to broker bridges where we could directly specify.
If this case arises I will open a Jira and add the suggested patch code.