Good question.
One answer could be, if you want predictable behaviour, don't use
overlapping topic subscriptions with per message subscription
handling.
We could of course take advantage of any future improvement to the
MQTT protocol in this regard.
For now, in the interests of simplicity, I would suggest matching
topics in the order in which they were subscribed. In the case of
the server sending one message per subscription, they would all
arrive on one callback.
Ian
On 05/06/2015 02:30 PM, Marc L Cohen
wrote:
What is the proposal for
deciding which subscription if the topic matches more than one
subscription and the server only sends one message, or if it
sends one per subscription?
Marc L. Cohen
MessageSight Test/Development
Internet:mlcohen@xxxxxxxxxx
also at:teddybbear@xxxxxxx
(512) 286-5744 (T/L 363-5744)
FAX (512) 973-4293
Ian Craggs
---05/06/2015 08:13:13 AM---I'm proposing to add per
subscription message handling callbacks to the Java client.
From: Ian Craggs
<icraggs@xxxxxxxxxxxxxxxxxxxxxxx>
To: General development discussions for
paho project <paho-dev@xxxxxxxxxxx>
Date: 05/06/2015 08:13 AM
Subject: [paho-dev] Java client: per
subscription message handling callbacks
Sent by: paho-dev-bounces@xxxxxxxxxxx
I'm proposing to add per subscription message
handling callbacks to the
Java client.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=466579
This will mean having to parse and match the incoming topics,
as MQTT
does not send the subscription topic with each message, but
the topic on
which the original message was published. I have some simple
code that
does that in the embedded C++ client however.
Any thoughts or comments welcome, here or in the bug....
Thanks
--
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
_______________________________________________
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
|