ActiveMQ parameter error "Invalid broker URI"

A particular error to start the project, suggesting abnormal parameters ActiveMQ

The value of the configuration parameter is as follows

Tracking error reading configuration code is as follows, see my key configured to read the corresponding value of xmq.actmq.connection.url.forSend, assigned to brokerURL property, create a connection object

In-depth tracking the source code to ActiveMQConnectionFactory class , where abnormal thrown

 

This class does not adopt defensive coding in the creation of URI way, leading pass into the parameters contains spaces, then throws an illegal argument exception, in fact  ActiveMQConnectionFactory.createURI method to transform what if the parameter spaces removed, can be avoided my argument in this case with spaces.

Here not change the source code, it can only be standardized parameters, remove the spaces; or the code when I pass this argument about the whole process.

 

Guess you like

Origin www.cnblogs.com/zjfjava/p/11117793.html