Hi Cristiano,
yes, I think I understand the issues correctly :-) I was thinking
of not allowing cleansession=true, or not allowing QoS 2.
The Kura solution sounds good, and I would like to not have to
duplicate that work. I wonder what is the best way to make it
easily available to people who just want these features in the Paho
client, but not necessarily the other features in Kura (yet)?
Thanks for bringing this Kura implementation to my attention,
because I had forgotten about it, even though I had been told
before.
Ian
On 07/10/2015 11:39, De Alti, Cristiano
wrote:
Hi Ian,
I actually meant clean session = true as a source of problems.
If you decide to provide the "publish while disconnected" feature
I think it only makes sense to allow QoS up to 1.
In our implementation we store messages in the HSQLDB database.
If the client stays disconnected for a long time there might be
many messages "queued" in the DB.
In some cases when the client reconnect, the application might
need to publish an "high priority" message that should go on the
wire as soon as possible,
taking over the outstanding messages in the queue.
This is why we provide a publish(int priority, ...) method.
For the rest, our DataService presents an MQTT interface with all
the required methods.
We propagate the connectionLost to the application but the
application does not need to do anything special (just log the
occurence).
thanks,
Cristiano
On 07/10/2015 12:13, Ian Craggs
wrote:
Hi Cristiano,
thanks. Yes, I realize that these functions do have
implications for QoS and cleansession. That's one of the
reasons we haven't implemented it before. Many client
implementations seem to ignore the potential problems though,
and users of them seem to be happy, and expect automatic
reconnect and publish while disconnected.
I was thinking that ideally the interface could be totally
refactored, so that a typical sequence of operations could be:
- create client
- connect (even this could be optional, but indicates that you
want to be connected)
- limit the options that can be used, no cleansession=true
for instance
- subscribe, if desired
- publish, whether connected or not
- disconnect (again, could be optional)
connectionLost is never called. Maybe another callback is
created to just to indicate when the connection has been lost,
but you don't have to implement the reconnect yourself.
Ian
On 07/10/2015 10:52, De Alti,
Cristiano wrote:
Hi,
We used this approach in the Eclipse Kura Project (automatic
reconnect + publish while disconnected) [1].
Note that publishing while disconnected may have serious
implications on the semantic of the the MQTT QoS, especially
if you connect with "Clean Session" equal to false.
[1] https://github.com/eclipse/kura/tree/develop/kura/org.eclipse.kura.core/src/main/java/org/eclipse/kura/core
Ciao,
Cristiano
On 07/10/2015 11:32, Ian Craggs
wrote:
Hi All,
we are working (well, mainly James Sutton is) to make the
Android service more stable. Any feedback on what needs to
be addressed will be helpful.
We are also thinking that maybe a clean slate with the
Android service might be a good option. Keep the Java
client base, but design a new Android layer above it (the
old one would still exist of course). What do you all
think?
We're also wanting to add automatic reconnect and the
ability to publish messages while disconnected. As we want
to add this in the base Java client, the Android service
should be able to take advantage of that rather than
duplicate the function.
Ian
On 10/05/2015 01:15 PM,
Prashant Kedia wrote:
Agreed with Manuel. Paho Android Service is
not stable, but I think it will take less efforts to
tune Android service as compare to java client.
Actually I am myself using Java Client with
android, but it's only because I am using it since
before Android service was available and now it would
be time consuming for me to switch to Android Service.
Beside this I have already tuned Java Client good
enough.
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
--
Cristiano De Alti
Principal Software
Engineer
direct: +39 0433
485468
EUROTECH
Imagine.Build.Succeed.
HEADQUARTERS
EUROTECH S.p.A. – Via
Fratelli Solari, 3/a | 33020 Amaro UD | Italy |
Tel. +39. 0433 485411 | Fax +39. 0433 485499 |
Cap. Soc.
8.878.946,00 € I.V. | P.IVA / C.F.: IT
01791330309 | REA Udine 196115
www.eurotech.com
____________________________________
Il
presente messaggio ed ogni suo allegato sono
da intendersi inviati esclusivamente agli
effettivi destinatari e potrebbero essere
soggetti a restrizioni legali. Se avete ricevuto
questo messaggio per errore vi invitiamo a darne
immediata notifica al mittente e cancellarlo dal
vostro sistema. Qualsiasi altro uso di questo
messaggio da parte vostra e' strettamente
proibito.
This e-mail, and any file
attached to it, is meant only for the intended
recipient of the transmission and may be a
communication privileged by law. If you have
received it in error, please notify the sender
immediately and delete the original from your
system. Any other use of this e-mail by you is
strictly forbidden.
____________________________________
Per
favore, pensate all’ambiente prima di stampare
questa e-mail. Please consider the
environment before printing this e-mail.
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
--
Cristiano De Alti
Principal
Software Engineer
direct:
+39 0433 485468
EUROTECH
Imagine.Build.Succeed.
HEADQUARTERS
EUROTECH S.p.A. – Via
Fratelli Solari, 3/a | 33020 Amaro UD | Italy | Tel.
+39. 0433 485411 | Fax +39. 0433 485499 |
Cap. Soc.
8.878.946,00 € I.V. | P.IVA / C.F.: IT 01791330309 |
REA Udine 196115
www.eurotech.com
____________________________________
Il presente messaggio ed ogni suo allegato
sono da intendersi inviati esclusivamente agli
effettivi destinatari e potrebbero essere soggetti a
restrizioni legali. Se avete ricevuto questo
messaggio per errore vi invitiamo a darne immediata
notifica al mittente e cancellarlo dal vostro
sistema. Qualsiasi altro uso di questo messaggio da
parte vostra e' strettamente proibito.
This e-mail, and any file
attached to it, is meant only for the intended
recipient of the transmission and may be a
communication privileged by law. If you have
received it in error, please notify the sender
immediately and delete the original from your
system. Any other use of this e-mail by you is
strictly forbidden.
____________________________________
Per favore,
pensate all’ambiente prima di stampare questa
e-mail. Please consider the
environment before printing this e-mail.
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
|