Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added simple publish method with retained flag #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

doebi
Copy link

@doebi doebi commented Sep 2, 2015

No description provided.

@moritzmhmk
Copy link

This is exactly what I was missing - why is this not merged?

@doebi
Copy link
Author

doebi commented Sep 16, 2015

i have no idea... looks like Imroy is kind of inactive atm. but you can use my branch for now, as long as there is no newer commit or this gets finally merged.

@Testato
Copy link

Testato commented Sep 17, 2015

Sorry for the question,
The retained flag will never expire ? The message whit retain flag will
send always to all subscribers ? At every subcription also if the
subscriber already received it some time ago ?

Thanks
Il 16/set/2015 23:13, "Christoph Döberl" notifications@github.com ha
scritto:

i have no idea... looks like Imroy is kind of inactive atm. but you can
use you my branch for now as long there is no newer commit or this gets
finally merged.


Reply to this email directly or view it on GitHub
#34 (comment).

@doebi
Copy link
Author

doebi commented Sep 17, 2015

This is actually a question about the protocol itself and not this client implementation. The man-page of mqtt, which can be found at http://mosquitto.org/man/mqtt-7.html defines retained messages as follows:

All messages may be set to be retained. This means that the broker will keep the message even after sending it to all current subscribers. If a new subscription is made that matches the topic of the retained message, then the message will be sent to the client. This is useful as a "last known good" mechanism. If a topic is only updated infrequently, then without a retained message, a newly subscribed client may have to wait a long time to receive an update. With a retained message, the client will receive an instant update.

Hope this helps. ;)

@skorokithakis
Copy link

@doebi, do you think you could add a simple library.json so this can get added to PlatformIO? It would greatly simplify dependency management for me.

http://docs.platformio.org/en/latest/librarymanager/creating.html#at-github

@Testato
Copy link

Testato commented Dec 11, 2015

Retain is already present in the new publish mqtt class, imroy maybe want to use MQTT:: instead of the original publish method of this lib ?

In the homepage of this github repo he write:

New features

A whole set of MQTT classes has been added, one for each message type. This moved a good amount of code out of the PubSubClient class, leaving it to handle the high-level flow of the protocol. The MQTT classes handle getting data into and out of the messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants