ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » mqtt android client - republish message on disconnect

Post new topic  Reply to topic
 mqtt android client - republish message on disconnect « View previous topic :: View next topic » 
Author Message
boristep
PostPosted: Wed Apr 06, 2016 3:41 am    Post subject: mqtt android client - republish message on disconnect Reply with quote

Novice

Joined: 02 Jan 2013
Posts: 11

We have to publish messages from MQTT clients (Android) with unstable connection. What is a right way to resend a message from a client that lost its connection to the server and can't connect at the moment?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Apr 06, 2016 5:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

MQTT clients should be buffering messages on the client side. They should resend when the connection is active.

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718103
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
boristep
PostPosted: Thu Apr 07, 2016 12:00 am    Post subject: Reply with quote

Novice

Joined: 02 Jan 2013
Posts: 11

I use Paho Java Client. Does this client have this functionality or I have to implement it in the application?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 07, 2016 4:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

boristep wrote:
I use Paho Java Client. Does this client have this functionality or I have to implement it in the application?


The link I posted is for the official specification of the MQTT protocol, not for information about a specific client.

The paho client will work the same way as any other client that implements the full and correct spec.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
boristep
PostPosted: Thu Apr 07, 2016 4:28 am    Post subject: Reply with quote

Novice

Joined: 02 Jan 2013
Posts: 11

Thank you mqjeff
Actually the question is how I implement this functionality using Paho Java Client?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 07, 2016 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

boristep wrote:
Thank you mqjeff
Actually the question is how I implement this functionality using Paho Java Client?


Don't use cleanSession.

That's it.

I mean set cleanSession to false, unless your paho client knows that it needs to discard any messages that haven't been delivered in either direction (after some kind of device reset for example).
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » mqtt android client - republish message on disconnect
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.