← Back to team overview

mosquitto-dev team mailing list archive

[Question #147696]: Can mosquitto allow -r without saving last


New question #147696 on mosquitto:

Can anyone tell me if I can send a mosquitto message (let's say using mosquitto_pub) and have that message be "retained" but...in a reasonable way?

Meaning...right now if I use -r I think it is, the message is retained Forever. I read your docs, makes sense for that purpose but not for many many other purposes.

For example:

I want to send a teacher a message:

1.) Hey Teacher

...They aren't connected.

2.) When they connect I want them to see the message (and any others stored).


3.) If they log off, and log back on...I want them to see Nothing (unless I have posted a new message for them).

Does this seem like a normal thing? Please advise. Thanks.


You received this question notification because you are a member of
Mosquitto Dev, which is an answer contact for mosquitto.