<div dir="ltr">So the log just has this output from the time of testing,<div><div>=INFO REPORT==== 25-Jul-2014::17:08:37 ===</div><div>closing AMQP connection <0.447.0> (<a href="http://127.0.0.1:49407" target="_top" rel="nofollow" link="external">127.0.0.1:49407</a> -> <a href="http://127.0.0.1:5672" target="_top" rel="nofollow" link="external">127.0.0.1:5672</a>)</div>
<div><br></div><div>=INFO REPORT==== 25-Jul-2014::17:08:50 ===</div><div>accepting MQTT connection (<a href="http://217.114.169.247:50777" target="_top" rel="nofollow" link="external">217.114.169.247:50777</a> -> <a href="http://143.239.72.239:1883" target="_top" rel="nofollow" link="external">143.239.72.239:1883</a>)</div>
<div><br></div><div>=WARNING REPORT==== 25-Jul-2014::17:08:50 ===</div><div>MQTT disconnecting duplicate client id "sub1_19c6ee855806c472" ("<a href="http://10.144.103.154:40335" target="_top" rel="nofollow" link="external">10.144.103.154:40335</a> -> <a href="http://143.239.72.239:1883" target="_top" rel="nofollow" link="external">143.239.72.239:1883</a>")</div>
</div><div><br></div><div>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.</div>
<div><br></div><div><div>try {</div><div><span class="" style="white-space:pre">                    </span>mClient = new MqttClient(url,mDeviceId,mMemStore);</div><div><span class="" style="white-space:pre">         </span>} catch (MqttException e1) {</div>
<div><span class="" style="white-space:pre">                    </span>// TODO Auto-generated catch block</div><div><span class="" style="white-space:pre">                 </span>e1.printStackTrace();</div><div><span class="" style="white-space:pre">              </span>}</div>
<div><span class="" style="white-space:pre">            </span>mConnHandler.post(new Runnable() {</div><div><span class="" style="white-space:pre">                 </span>@Override</div><div><span class="" style="white-space:pre">                  </span>public void run() {</div>
<div><span class="" style="white-space:pre">                            </span>try {</div><div><span class="" style="white-space:pre">                                      </span>mClient.connect(mOpts);</div><div><br></div><div><span class="" style="white-space:pre">                                   </span>mClient.subscribe("hello.alert", 1);</div>
<div><br></div><div><br></div><div><span class="" style="white-space:pre">                                  </span>mClient.setCallback(MqttService.this);</div><div><br></div><div><br></div><div><span class="" style="white-space:pre">                                   </span>mStarted = true; </div>
<div><br></div><div><span class="" style="white-space:pre">                                   </span>startKeepAlives();</div><div><span class="" style="white-space:pre">                         </span>} catch(MqttException e) {</div><div><span class="" style="white-space:pre">                                 </span>e.printStackTrace();</div>
<div><span class="" style="white-space:pre">                            </span>}</div><div><span class="" style="white-space:pre">                  </span>}</div><div><span class="" style="white-space:pre">          </span>});</div><div><span class="" style="white-space:pre">        </span>}</div>
</div><div><br></div><div>Thanks</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 8:43 PM, Michael Klishin-2 [via RabbitMQ] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=36892&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">

        On 25 July 2014 at 23:09:44, brydev (<a href="http://user/SendEmail.jtp?type=node&node=36890&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>) wrote:
<div><div class='shrinkable-quote'><br>> > I've implemented a Paho MQTT service in Android which is currently 
<br>> unable to
<br>> consume unacked messages upon reconnect to the RabbitMQ broker 
<br>> with MQTT
<br>> plugin. If I force the callback when the connectivity changes, 
<br>> it will
<br>> consume the missed messages.
<br>> 
<br>> Sometimes forcing the callback will not work and the messages 
<br>> remain unacked
<br>> on the broker. Due to the unusual behaviour of when the message 
<br>> consumes
<br>> from the queue makes the service unreliable. The messages are 
<br>> QoS 1.
</div></div></div><div class="">What do you mean by "forcing the callback"?
<br></div><div class=""><div><div class='shrinkable-quote'><br>> Also upon reconnect the messages will arrive as normal to the 
<br>> device but the
<br>> missed ones never get re-queued.
<br>> 
<br>> The application is currently behaving fine when receiving messages 
<br>> from a
<br>> mosquitto broker so am I missing any implementation?
<br>> 
<br>> Is this a bug or is there a setting I have possible missed for consuming 
<br>> messages from my topic.
</div></div></div><div class="">Can you post some example code that demonstrates the issue? What's in RabbitMQ log
<br>files?
<br>-- 
<br>MK 
<br><br>Staff Software Engineer, Pivotal/RabbitMQ
<br></div><div class="">_______________________________________________
<br>rabbitmq-discuss mailing list has moved to <a href="https://groups.google.com/forum/#!forum/rabbitmq-users" rel="nofollow" link="external" target="_blank">https://groups.google.com/forum/#!forum/rabbitmq-users</a>,
<br>please subscribe to the new list!
<br><br></div><a href="http://user/SendEmail.jtp?type=node&node=36890&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" rel="nofollow" link="external" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://rabbitmq.1065348.n5.nabble.com/MQTT-plugin-QoS-1-Android-not-consuming-on-reconnect-tp36888p36890.html" target="_blank" rel="nofollow" link="external">http://rabbitmq.1065348.n5.nabble.com/MQTT-plugin-QoS-1-Android-not-consuming-on-reconnect-tp36888p36890.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from MQTT plugin, QoS 1, Android, not consuming on reconnect, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a href="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" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/MQTT-plugin-QoS-1-Android-not-consuming-on-reconnect-tp36888p36892.html">Re: MQTT plugin, QoS 1, Android, not consuming on reconnect</a><br/>
Sent from the <a href="http://rabbitmq.1065348.n5.nabble.com/">RabbitMQ mailing list archive</a> at Nabble.com.<br/>