Command contained invalid message id: 2 after receiving of the first message in Android-Client

71 views
Skip to first unread message

Oleksii Donets

unread,
May 28, 2014, 10:54:47 AM5/28/14
to mq...@googlegroups.com
Hello,

I am implementing something like chat functions on Android using MQTT and took the available example from MQTT and changed it a little in order to have a Listener. The connection is established from Android-Client to ActiveMQ-Brocker. As well I have a JbossServer with @ResourceAdapter("activemq.rar") and MDB in order to implement administration(create a new Topic at runtime etc. ) on the Server side.

I have a question concerning the Listener and Publisher in Android-Clien . The Listener and subscription is set up. It works well, but only for the first message (both ways: sending from the Client to Topic and sending from the WebConsole to Topic). 
On receiving of the second message occurs an error on Android-client in Listener onFailure: java.net.ProtocolException: Command from server contained an invalid message id: 2. The same error occurs, when I try to send the second message from Client.
I attached my code.
I would be grateful if you would help me with this error.

Cheers
Alex
MQTTActivity.java

Nicholas O'Leary

unread,
May 28, 2014, 11:03:17 AM5/28/14
to mq...@googlegroups.com
Hi Alex,

this mailing list is for the protocol rather than any specific implementation.

You should contact the support channel for whichever client implementation you are using.

Regards,
Nick


--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Andy Piper

unread,
May 29, 2014, 7:21:46 AM5/29/14
to mq...@googlegroups.com
Hey Alex

That sounds like something in either the FuseSource client code you are using, or with the way the ActiveMQ broker is sending messages back to the client. You'd be best asking those projects whether this is intended behaviour.

Andy


--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.



--
Andy Piper | Kingston upon Thames, London (UK)
blog: http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper
Reply all
Reply to author
Forward
0 new messages