[rabbitmq-discuss] MQTT plugin, QoS 1, Android, not consuming on reconnect

brydev bcliffe at gmail.com
Fri Jul 25 20:53:25 BST 2014


So the log just has this output from the time of testing,
=INFO REPORT==== 25-Jul-2014::17:08:37 ===
closing AMQP connection <0.447.0> (127.0.0.1:49407 -> 127.0.0.1:5672)

=INFO REPORT==== 25-Jul-2014::17:08:50 ===
accepting MQTT connection (217.114.169.247:50777 -> 143.239.72.239:1883)

=WARNING REPORT==== 25-Jul-2014::17:08:50 ===
MQTT disconnecting duplicate client id "sub1_19c6ee855806c472" ("
10.144.103.154:40335 -> 143.239.72.239:1883")

This gets called after a disconnect, if I call
mClient.setCallback(MqttService.this); it forces the message queue onto the
device but it only works sometimes, usually only on a fresh start.

try {
mClient = new MqttClient(url,mDeviceId,mMemStore);
} catch (MqttException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
mConnHandler.post(new Runnable() {
@Override
public void run() {
try {
mClient.connect(mOpts);

mClient.subscribe("hello.alert", 1);


mClient.setCallback(MqttService.this);


mStarted = true;

startKeepAlives();
} catch(MqttException e) {
e.printStackTrace();
}
}
});
}

Thanks


On Fri, Jul 25, 2014 at 8:43 PM, Michael Klishin-2 [via RabbitMQ] <
ml-node+s1065348n36890h53 at n5.nabble.com> wrote:

> On 25 July 2014 at 23:09:44, brydev ([hidden email]
> <http://user/SendEmail.jtp?type=node&node=36890&i=0>) wrote:
>
> > > I've implemented a Paho MQTT service in Android which is currently
> > unable to
> > consume unacked messages upon reconnect to the RabbitMQ broker
> > with MQTT
> > plugin. If I force the callback when the connectivity changes,
> > it will
> > consume the missed messages.
> >
> > Sometimes forcing the callback will not work and the messages
> > remain unacked
> > on the broker. Due to the unusual behaviour of when the message
> > consumes
> > from the queue makes the service unreliable. The messages are
> > QoS 1.
>
> What do you mean by "forcing the callback"?
>
> > Also upon reconnect the messages will arrive as normal to the
> > device but the
> > missed ones never get re-queued.
> >
> > The application is currently behaving fine when receiving messages
> > from a
> > mosquitto broker so am I missing any implementation?
> >
> > Is this a bug or is there a setting I have possible missed for consuming
> > messages from my topic.
>
> Can you post some example code that demonstrates the issue? What's in
> RabbitMQ log
> files?
> --
> MK
>
> Staff Software Engineer, Pivotal/RabbitMQ
> _______________________________________________
> rabbitmq-discuss mailing list has moved to
> https://groups.google.com/forum/#!forum/rabbitmq-users,
> please subscribe to the new list!
>
> [hidden email] <http://user/SendEmail.jtp?type=node&node=36890&i=1>
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://rabbitmq.1065348.n5.nabble.com/MQTT-plugin-QoS-1-Android-not-consuming-on-reconnect-tp36888p36890.html
>  To unsubscribe from MQTT plugin, QoS 1, Android, not consuming on
> reconnect, click here
> <http://rabbitmq.1065348.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=36888&code=YmNsaWZmZUBnbWFpbC5jb218MzY4ODh8MTQ1NzU4Njg1Mg==>
> .
> NAML
> <http://rabbitmq.1065348.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/MQTT-plugin-QoS-1-Android-not-consuming-on-reconnect-tp36888p36892.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140725/38082bb0/attachment.html>


More information about the rabbitmq-discuss mailing list