Simply put, I can’t have ActiveMQ broker binds to a UDP port. What I saw from the output is this:
Starting UdpTransportServer@udp://0.0.0.0:61617@0
However, when I tried to list the UDP port, I found nothing:
$ netstat -an | grep 61617
Obviously, it’s about this class: ./activemq/transport/udp/UdpTransportServer.java.
protected void doStart() throws Exception {According to UdpTransport.toString(), there is something really interesting:
LOG.info("Starting " + this);
configuredTransport.setTransportListener(new TransportListener() {
public void onCommand(Object o) {
final Command command = (Command)o;
processInboundConnection(command);
}
public void onException(IOException error) {
LOG.error("Caught: " + error, error);
}
public void transportInterupted() {
}
public void transportResumed() {
}
});
configuredTransport.start();
}
/**See?
* @return pretty print of 'this'
*/
public String toString() {
if (description != null) {
return description + port;
} else {
return getProtocolUriScheme() + targetAddress + "@" + port;
}
}
Starting UdpTransportServer@udp://0.0.0.0:61617@0
This @0 thing. Zero is supposed to be the port!! How could it be?! I don’t know. Let’s figure it out later.
No comments:
Post a Comment