[ 
https://issues.apache.org/jira/browse/AMQ-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16303322#comment-16303322
 ] 

Alejandro Fernandez Haro commented on AMQ-6870:
-----------------------------------------------

Si what is this class for? 
http://activemq.apache.org/maven/apidocs/org/apache/activemq/transport/stomp/StompSslTransportFactory.html

I insist that, if a class exist, it needs to work. It does tell much wrong 
about the health of a software if it has a class with a bug and the solution is 
denying it.

If it’s not supported, it should clearly say so. Especially since there is a 
class for it.
I’m using JMS connection for this Java app I needed (I had to open the ports 
specifically for it) and, happily for me, most of my work is done in other 
working languages.

My main concern is how badly maintained this code is if, even when a feature 
exists (broken, but there it is and you can see it in the source code). I took 
the time to let you know and tried to help in sharing all the info I could to 
fix this bug. And the response is “use another thing because we are not going 
to fix the bug”. I know this ticket is even closed at the moment. How sad it is 
you deny from supporting a standard and you don’t plan even updating the 
already existing class to log that same message instead of a random error as 
you are logging at the moment.

> java.lang.IllegalArgumentException: Invalid connect parameters: 
> {wireFormat.host=localhost}
> -------------------------------------------------------------------------------------------
>
>                 Key: AMQ-6870
>                 URL: https://issues.apache.org/jira/browse/AMQ-6870
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Alejandro Fernandez Haro
>
> I want to connect to my broker using STOMP+SSL as because my broker is 
> exposing that protocol:
> {code:xml}
> <transportConnector name="stomp+nio+ssl" 
> uri="stomp+nio+ssl://0.0.0.0:61612?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
> {code}
> The connector is working fine because I'm able to connect to it with a 
> Javascript library and another Ruby one.
> But when using the Java libraries, by applying the connection string 
> {{"stomp+ssl://localhost:61612"}} or 
> {{"ssl://localhost:61612?wireFormat=stomp"}} it fails because of a bug in the 
> StompSslTransportFactory not supporting the field {{wireFormat.host}}.
> An easy way to get the same error is by applying the following config in 
> camel:
> {code:xml}
> <bean id="myConnectionFactory" 
> class="org.apache.activemq.ActiveMQConnectionFactory">
>     <property name="brokerURL" value="stomp+ssl://localhost:61612"/>
>     <!-- or with <property name="brokerURL" 
> value="ssl://localhost:61612?wireFormat=stomp"/> -->
>     <property name="userName" value="${amq.user}"/>
>     <property name="password" value="${amq.pass}"/>
> </bean>
> {code}
> The error I'm getting is:
> {code}
> Invalid connect parameters: {wireFormat.host=localhost}
> {code}
> I think it might be related to this piece of code where it enforces the value 
> if it doesn't exist:
> {code:title=org/apache/activemq/transport/TransportFactory.java}
>     public Transport doConnect(URI location) throws Exception { 
>         try { 
>             Map<String, String> options = new HashMap<String, 
> String>(URISupport.parseParameters(location)); 
>             if( !options.containsKey("wireFormat.host") ) { 
>                 options.put("wireFormat.host", location.getHost()); 
>             } 
>             WireFormat wf = createWireFormat(options); 
>             Transport transport = createTransport(location, wf); 
>             Transport rc = configure(transport, wf, options); 
>             if (!options.isEmpty()) { 
>                 throw new IllegalArgumentException("Invalid connect 
> parameters: " + options); 
>             } 
>             return rc; 
>         } catch (URISyntaxException e) { 
>             throw IOExceptionSupport.create(e); 
>         } 
>     } 
> {code}
> Here's another experience from another guy suffering from the same bug: 
> http://activemq.2283324.n4.nabble.com/quot-wireFormat-host-quot-option-for-StompSslTransportFactory-td4685162.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to