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

Timothy Bish commented on AMQ-6870:
-----------------------------------

You say you are using Java libraries to try and connect to the STOMP endpoint, 
is the Java library you are trying to use the ActiveMQ JMS Client library?  If 
so that won't work as that client only speaks OpenWire, no STIMP support in 
there.  

> 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