Project: springxd
Issue XD-393: Allow Streamserver/tomcat to chooce free port
Currently you need to define a port which tomcat will use to bind to. If XD is embedded or run in a Hadoop it is not possible to know which port should be used. Current embedded tomcat version is able to use the 0-port trick for it to choose free port. Real binded port can be asked from a connector using below example. org/springframework/xd/dirt/stream/StreamServer.java: public int getLocalPort() { return this.tomcat.getConnector().getLocalPort(); } Also I believe Streamserver should provide a method to ask what is the real url to connect to or atleast what streamserver thinks what it is. This will make life much easier for components empedding spring-xd.
Story points: 1