Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Suggestion regarding `persistent_client_expiration`

Hi Felipe,

I can kind of see where you're coming from here, although it doesn't
feel quite right to me.

The persistent_client_expiration option is related to durable clients
(clean session=0) that have disconnected. In that situation, the
client may never reconnect so this option allows the broker to discard
the stored client and related subscriptions/queued messages. What
you're suggesting is to use that mechanism to discard what you regard
as expired data. The trouble is that it will discard everything
related to the client, not just the "old" data. So if for example you
said that any data older than 5 seconds is too old and set
persistent_client_expiration to 5, then had a client that received
some messages 4.9 seconds after disconnecting, then the client
reconnected in another 0.2 seconds, then you would see nothing, even
though the data was valid.

At the moment the shortest check interval is actually an hour - this
was introduced in 1.4, so you may want to check you're up to date.

If you can convince me that it's worthwhile changing the shortest
interval then I'll happily accept a patch, but at the moment I don't
believe it's the right solution even for you. Have you considered how
you could handle this situation in your application? Is this scenario
something that is really likely to be a problem for you?

Cheers,

Roger


On Sun, Jul 5, 2015 at 8:51 PM, Felipe de Andrade Neves Lavratti
<felipelav@xxxxxxxxx> wrote:
> The configuration key `persistent_client_expiration` has its minimum
> value of 1 day.
>
> There are network contexts, including the one I use Mosquitto with,
> where valid data has the expiration time lower than 1 day, for
> example, actuators in a real time network, where the network must
> respond in a time window of seconds to the user input.
>
> If the configuration key `persistent_client_expiration` accepted
> _seconds_ and _minutes_ as valid value. Clients, in these real time
> networks, could catch only not expired data from the broker in the
> events of the connection getting dropped and re-established again.
>
> To make it short:
> My suggestion is that `persistent_client_expiration` get implemented
> to work with time windows from 1 sec.
>
> I can do the coding, just need to know if it is a welcome change.
>
> Thanks!
>
> --
> Skype: felipeanl
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top