Hi Abhishek, yes another thread is probably better and will need a sample project to reproduce it.
Side note: did you already checked you don't do that http://activemq.2283324.n4.nabble.com/MQTTFrame-unknown-td4697966.html ? Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-11-09 18:13 GMT+01:00 Abhishek <[email protected]>: > hasalex wrote > > It works ! > > > > I've added this piece of configuration in the tomee.xml file : > > > > > > <Resource id="MqttResourceAdapter" type="ActiveMQResourceAdapter"> > > BrokerXmlConfig = broker:(mqtt://localhost:1883) > > > > </Resource> > > > > > > Then I've added mqtt-client-1.6.jar and activemq-mqtt-5.9.0.jar files > into > > TomEE's lib directory. > > Hi, > > I am trying to enable MQTT in Apache TomEE 7.0.1. I have updated tomee.xml > with below contents > <Resource id="MQTTResourceAdapter" type="ActiveMQResourceAdapter"> > BrokerXmlConfig = > broker:(mqtt://localhost:1883)?useJmx=false&persistent=false > </Resource> > > I also added the activemq-mqtt-5.13.3.jar and other dependencies to > tomee/lib > > But when I run my Maven project on TomEE (Windows 10) following message is > displayed > > /WARNING - Exception occurred processing: > MQTTFrame { type: unknown, qos: AT_MOST_ONCE, dup:false }: > org.apache.activemq.transport.mqtt.MQTTProtocolException: Unknown > MQTTFrame > type: 0/ > > In the code when I try to create the connection then exception is thrown. > > Code: > /ConnectionFactory factory = new > ActiveMQConnectionFactory("tcp://localhost:1883"); > Connection connection = factory.createConnection(); > connection.start();/ > > Exception: > *javax.jms.JMSException: Cannot send, channel has already failed: > tcp://127.0.0.1:1883* > at > org.apache.activemq.util.JMSExceptionSupport.create( > JMSExceptionSupport.java:72) > at > org.apache.activemq.ActiveMQConnection.syncSendPacket( > ActiveMQConnection.java:1407) > at > org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent( > ActiveMQConnection.java:1496) > at > org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:523) > > > Since there was a thread on this topic I posted here. If required I will > start a new thread. > > Thanks, > Abhishek > > > > > > > -- > View this message in context: http://tomee-openejb.979440. > n4.nabble.com/How-to-enable-MQTT-in-TomEE-tp4666817p4680509.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
