OK, try a url like this: tcp://localhost:61616/localhost:56565
You'll find it connects to localhost:61616 and binds to localhost:56565 I don't see any documentation on the website for this feature though. Art On Fri, Mar 16, 2018 at 2:27 PM, Arthur Naseef <a...@amlinv.com> wrote: > 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 <max-jul...@pogner.at> > 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/tra >> nsport/tcp/TcpTransportFactory.java;h=ae555fdf1b8527486b37ef >> 6dab95f4860af9f6db;hb=HEAD> >> lines 125 to 144 >> >> with kind regards, >> >> Max >> >> >> >> >