You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by oliverd <ol...@hotmail.com> on 2014/07/02 19:41:20 UTC
MQTT NIO transport hangup
I'm trying out the MQTT transport and examples available as of version 5.9
(example.Publisher, example.Listener using fusesource mqtt-client)
when activating connector mqtt+nio on broker side, running the Publisher
leads to an infinite loop in class
org.apache.activemq.transport.mqtt.MQTTCodec, method processHeader
it works fine running it with mqtt connector, i.e. it is somehow related to
NIO
has anyone encountered this behavior?
I tried with different JDK version (6, 7) on Windows to exclude some JDK/OS
related issue without success
--
View this message in context: http://activemq.2283324.n4.nabble.com/MQTT-NIO-transport-hangup-tp4682745.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: MQTT NIO transport hangup
Posted by oliverd <ol...@hotmail.com>.
repeated the test with v5.10.0 - same behavior
stack trace shows:
Name: ActiveMQ NIO Worker 2
State: RUNNABLE
Total blocked: 0 Total waited: 1
Stack trace:
org.fusesource.hawtbuf.DataByteArrayInputStream.readByte(DataByteArrayInputStream.java:224)
org.apache.activemq.transport.mqtt.MQTTCodec.processHeader(MQTTCodec.java:100)
org.apache.activemq.transport.mqtt.MQTTCodec.parse(MQTTCodec.java:73)
org.apache.activemq.transport.mqtt.MQTTNIOTransport.serviceRead(MQTTNIOTransport.java:105)
org.apache.activemq.transport.mqtt.MQTTNIOTransport.access$000(MQTTNIOTransport.java:43)
org.apache.activemq.transport.mqtt.MQTTNIOTransport$1.onSelect(MQTTNIOTransport.java:66)
org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:94)
org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:119)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)
or:
Name: ActiveMQ NIO Worker 2
State: RUNNABLE
Total blocked: 0 Total waited: 1
Stack trace:
org.apache.activemq.transport.mqtt.MQTTCodec.processHeader(MQTTCodec.java:104)
org.apache.activemq.transport.mqtt.MQTTCodec.parse(MQTTCodec.java:73)
org.apache.activemq.transport.mqtt.MQTTNIOTransport.serviceRead(MQTTNIOTransport.java:105)
org.apache.activemq.transport.mqtt.MQTTNIOTransport.access$000(MQTTNIOTransport.java:43)
org.apache.activemq.transport.mqtt.MQTTNIOTransport$1.onSelect(MQTTNIOTransport.java:66)
org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:94)
org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:119)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)
i.e. it spins thru the while loop in the processHeader method
also tried with different mqtt-client versions 1.4, 1.6, 1.8 - no change
--
View this message in context: http://activemq.2283324.n4.nabble.com/MQTT-NIO-transport-hangup-tp4682745p4682759.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: MQTT NIO transport hangup
Posted by Timothy Bish <ta...@gmail.com>.
On 07/02/2014 01:41 PM, oliverd wrote:
> I'm trying out the MQTT transport and examples available as of version 5.9
> (example.Publisher, example.Listener using fusesource mqtt-client)
>
> when activating connector mqtt+nio on broker side, running the Publisher
> leads to an infinite loop in class
> org.apache.activemq.transport.mqtt.MQTTCodec, method processHeader
>
> it works fine running it with mqtt connector, i.e. it is somehow related to
> NIO
> has anyone encountered this behavior?
>
> I tried with different JDK version (6, 7) on Windows to exclude some JDK/OS
> related issue without success
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/MQTT-NIO-transport-hangup-tp4682745.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Have you tried this v5.10.0 which has numerous MQTT related fixes?
--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/