Looking at TcpTransport, I can see that it accepts both remoteLocation and localLocation.
If localLocation is defined, it binds the local end of the socket to that address. As for the logic in the factory, I'm still trying to decipher it fully. Art On Fri, Mar 16, 2018 at 1:20 PM, Max-Julian Pogner <[email protected]> wrote: > Hi there! > > while investigating unintended behaviour of the program i am currently > writing on, i stumbled over code in TcpTransportFactory.java (in > activemq-client) where i cannot quite ascertain the author's intention. > > *) what is a "local location uri"? (or is it just any URI, but then what > does the word "local location" mean?) > *) why is the port parsed as part of the path, isn't the java.net.URI > object given as parameter already supposed to have the schema, path, > port, etc separately? > > I would be glad, if someone could give me a hint or two. > > as a quick reference to the relevant code: > <https://git-wip-us.apache.org/repos/asf?p=activemq.git; > a=blob;f=activemq-client/src/main/java/org/apache/activemq/transport/tcp/ > TcpTransportFactory.java;h=ae555fdf1b8527486b37ef6dab95f4 > 860af9f6db;hb=HEAD> > lines 125 to 144 > > with kind regards, > > Max > > > >
