This is the third thread you've started in the past two days asking the same question. Please don't create duplicate threads.
On May 11, 2017 6:54 AM, "aragoubi" <aymen....@gmail.com> wrote: > I have an embedded activeMQ broker listening to two ports. > > Here's my broker-config file : > > <?xml version="1.0" encoding="UTF-8"?> > <beans > xmlns="http://www.springframework.org/schema/beans" > xmlns:amq="http://activemq.apache.org/schema/core" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd > http://activemq.apache.org/schema/core > http://activemq.apache.org/schema/core/activemq-core.xsd"> > > > <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" > useShutdownHook="false" brokerName="mimo.broker1"> > > <managementContext> > <managementContext createConnector="false"/> > </managementContext> > <systemUsage> > <systemUsage> > <memoryUsage> > <memoryUsage limit="64 mb"/> > </memoryUsage> > <storeUsage> > <storeUsage limit="100 gb"/> > </storeUsage> > <tempUsage> > <tempUsage limit="50 gb"/> > </tempUsage> > </systemUsage> > </systemUsage> > <persistenceAdapter> > <kahaDB directory="activemq-data/kahadb"/> > </persistenceAdapter> > <transportConnectors> > <transportConnector name="mimo.broker1" uri="tcp://0.0.0.0:61616" /> > <transportConnector name="mqtt+ws" uri="ws://0.0.0.0:1884"/> > </transportConnectors> > > </broker> > </beans> > > When I launch my jboss server I see that the broker is launched and > listening to ports: > > 11:00:33,792 INFO > [org.apache.activemq.transport.TransportServerThreadSupport] (Starting > ActiveMQ Broker) Listening for connections at: tcp://DESKTOP-4D80FU1:61616 > 11:00:33,793 INFO [org.apache.activemq.broker.TransportConnector] > (Starting > ActiveMQ Broker) Connector mimo.broker1 started > 11:00:33,849 INFO [org.eclipse.jetty.server.Server] (Starting ActiveMQ > Broker) jetty-7.6.9.v20130131 > 11:00:33,876 INFO [org.eclipse.jetty.server.handler.ContextHandler] > (Starting ActiveMQ Broker) started o.e.j.s.ServletContextHandler{/,null} > 11:00:33,905 INFO [org.eclipse.jetty.server.AbstractConnector] (Starting > ActiveMQ Broker) Started SelectChannelConnector@0.0.0.0:1884 > 11:00:33,906 INFO [org.apache.activemq.transport.ws.WSTransportServer] > (Starting ActiveMQ Broker) Listening for connections at > ws://DESKTOP-4D80FU1:1884 > 11:00:33,907 INFO [org.apache.activemq.broker.TransportConnector] > (Starting > ActiveMQ Broker) Connector mqtt+ws started > 11:00:33,908 INFO [org.apache.activemq.broker.BrokerService] (Starting > ActiveMQ Broker) Apache ActiveMQ 5.9.0 (mimo.broker1, > ID:DESKTOP-4D80FU1-57645-1494493233653-0:1) started > 11:00:33,909 INFO [org.apache.activemq.broker.BrokerService] (Starting > ActiveMQ Broker) For help or more information please see: > http://activemq.apache.org > > I tried a mqtt client using java paho mqttv3, this is how I tried to > connect > to my broker: > > String broker = "ws://127.0.0.1:1883"; > String clientId = "JavaSample"; > MemoryPersistence persistence = new MemoryPersistence(); > try { > MqttAsyncClient sampleClient = new MqttAsyncClient(broker, > clientId, persistence); > MqttConnectOptions connOpts = new MqttConnectOptions(); > connOpts.setCleanSession(true); > connOpts.setAutomaticReconnect(true); > IMqttToken token = sampleClient.connect(connOpts); > }catch(MqttException e){ > e.printStackTrace(); > } > > My problem is that the connection is never getting established with the > broker. > I am getting this warn when I try to connect to broker "[WARN > [org.apache.activemq.broker.TransportConnection.Transport] > (qtp906254668-147) Transport Connection to: MQTTSocket_248153872 failed: > java.io.IOException: Invalid CONNECT encoding". > > I tried to connect to mosquitto remote broker > "tcp://test.mosquitto.org:1883" and it works. > Could someone help me with this? Is this an activeMQ configuration problem? > > > > -- > View this message in context: http://activemq.2283324.n4. > nabble.com/WARN-org-apache-activemq-broker-TransportConnection-Transport- > qtp906254668-147-Transport-Connection-g-tp4725962.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >