Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] [EXTERNAL]: Re: CleanStart only on first CONNECT

Yes, that would be a good idea.


-----Ursprüngliche Nachricht-----
Von: mosquitto-dev-bounces@xxxxxxxxxxx <mosquitto-dev-bounces@xxxxxxxxxxx> Im Auftrag von Roger Light
Gesendet: Mittwoch, 9. Oktober 2019 17:21
An: General development discussions for the mosquitto project <mosquitto-dev@xxxxxxxxxxx>
Betreff: [EXTERNAL]: Re: [mosquitto-dev] CleanStart only on first CONNECT

Hi Beat,

It's not currently possible, but I agree that it should be.

How about if you could configure the clean start behaviour something like this:

mosquitto_int_option(mosq, MOSQ_OPT_CLEAN_START, ALWAYS); mosquitto_int_option(mosq, MOSQ_OPT_CLEAN_START, FIRST_TIME_ONLY);

Regards,

Roger

On Wed, 9 Oct 2019 at 09:00, Schär, Beat <beat.schaer@xxxxxxxxxx> wrote:
>
> Hi
>
>
>
> I have a use-case here, where I want to be able to send CleanStart=true only on the initial CONNECT. All subsequent CONNECTs, which are always re-connects because of an unplanned disconnection, should call CONNECT with CleanStart=false, therefore enabling the client as well as the broker to continue the interrupted session.
>
>
>
> Now with libmosquitto I don’t see how this could be achieved (even after studying the source code): I can set the clean_start flag only once, during the call to mosquito_new() and then it stays the way it has been set. There is no way to change it to false after the initial connection has been achieved, without calling mosquito_reinitialise(), which will itself clean-up everything (including currenty unsent messages). But resending unsent messages after an unplanned disconnect is exactly one of the things I’d like to achieve.
>
>
>
> So does anybody knows if this is possible in libmosquitto and if yes, how it could be achieved.
>
>
>
> Thanks
>
>
>
> This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original. Neither this information block, the typed name of the sender, nor anything else in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eclipse.org_m
> ailman_listinfo_mosquitto-2Ddev&d=DwIGaQ&c=pG3N8eJDEvizGbIy8hw-0w&r=3t
> jzSvcNGTy4Mopg_0TbKH-q_AhBCRH42qX7Khb8QJU&m=wXe1NuaIHAt3trJT94oqVluxIS
> FAyOnqRjb0MqTy8jE&s=DmtwoWQ9Y5GMOUdNq5jbx6qSVsmRNggiesoXXFvWhWQ&e=
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eclipse.org_mailman_listinfo_mosquitto-2Ddev&d=DwIGaQ&c=pG3N8eJDEvizGbIy8hw-0w&r=3tjzSvcNGTy4Mopg_0TbKH-q_AhBCRH42qX7Khb8QJU&m=wXe1NuaIHAt3trJT94oqVluxISFAyOnqRjb0MqTy8jE&s=DmtwoWQ9Y5GMOUdNq5jbx6qSVsmRNggiesoXXFvWhWQ&e=
This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original. Neither this information block, the typed name of the sender, nor anything else in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

Back to the top