On 08/29/2014 05:54 PM, opks wrote:
The problem is that you are trying to use the ActiveMQ client to speak STOMP which it cannot do. Use tcp or ssl as the scheme, no stomp options.I got the following error message: "Invalid connect parameters: {wireFormat.host=localhost}"jmsTemplate is configured using stomp+ssl: jmsTemplate.setConnectionFactory(new ActiveMQConnectionFactory("stomp+ssl://localhost:61614?trace=true")); The error happens when I use the jmsTemplate to send notification: jmsTemplate.convertAndSend("/topic/notification", n); After tracing the source code, I find this function in 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); } }"wireFormat.host" is added to the "options", and the "options" is used in "configure(transport, wf, options)", StompSslTransportFactory.java then calls "IntrospectionSupport.setProperties(transport, options)" using the options, unfortunately, there is no setter method called "setWireFormat.host". I found "wireFormat.host" option was added in here: "http://mail-archives.apache.org/mod_mbox/activemq-commits/201402.mbox/%[email protected]%3E", but StompSslTransportFactory.java has problem to handle this option. Can anybody familiar with this part of code provide some insight on this? Thanks -- View this message in context: http://activemq.2283324.n4.nabble.com/wireFormat-host-option-for-StompSslTransportFactory-tp4685162.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
-- Tim Bish Sr Software Engineer | RedHat Inc. [email protected] | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/
