activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (AMQ-6870) java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost}
Date Mon, 25 Dec 2017 15:09:00 GMT

     [ https://issues.apache.org/jira/browse/AMQ-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Timothy Bish closed AMQ-6870.
-----------------------------
    Resolution: Not A Problem

The ActiveMQ client library does not and will not support STOMP, if you want to use STOMP
as a JMS client (which you really shouldn't) then you'd need to choose a STOMP based JMS client
library.  

> 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)

Mime
View raw message