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

Christopher L. Shannon commented on AMQ-6870:
---------------------------------------------

The StompSslTransportFactory class (and other matching factories for AMQP, 
MQTT, etc) exist for the broker side and is not a client side class.  The class 
exists only in the activemq-stomp jar and is not part of the activemq-client 
jar. The broker uses it to create the server side transport in order to handle 
the STOMP protocol on the broker.  It is not intended for use by the client and 
if you try it isn't going to work because it was never designed as a client 
side class.

No one is denying supporting a standard or telling you to use something else 
because we aren't going to fix a bug.  This was closed because as Tim 
mentioned, there is no bug because the ActiveMQ clients only job is to support 
JMS using the native OpenWire protocol.  It does not support any other protocol 
but OpenWire.  If you want to use STOMP then you need to use a STOMP client.  
Just like if you want to use MQTT or AMQP you need to use clients that support 
those protocols.

I think this is pretty clear and I'm closing this again because this is not a 
bug and works as intended.

> 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