← Back to team overview

mosquitto-users team mailing list archive

Re: Removal of old topics

 

A combination of your three answers was exactly what i was looking for,
much obliged!

/Daniel


2013/11/19 Roger Light <roger@xxxxxxxxxx>

> Hi Daniel,
>
> Durable clients (clean session=false) that make subscriptions and then
> disconnect will have messages queued for them if the subscription has
> qos>0 or if queue_qos0_messages is true. If
> persistent_client_expiration has a value, once the duration has been
> met then the client, its subscriptions and queued messages will be
> deleted.
>
> This does not affect topics with retained messages set, they are a
> different thing altogether. This is what Andy is referring to - you
> can clear a retained message by sending a new retained message with
> zero length payload:
>
> mosquitto_pub -n -r -t foo/bar
>
> I'm not entirely sure what you mean by a topic being removed, unless
> you are referring to retained messages.
>
> Cheers,
>
> Roger
>
> On Tue, Nov 19, 2013 at 8:01 AM, Daniel Arenhage
> <daniel.arenhage@xxxxxxxxx> wrote:
> > Hello,
> >
> > Basically my question is, is there a way to determine and remove old
> topics
> > having durable subscribers (clean session set to false)?
> >
> > The configuration property :
> > http://mosquitto.org/man/mosquitto-conf-5.html
> > persistent_client_expiration
> >
> > i interpret to clean up the durable (those with clean session set to
> false)
> > subscriptions to that topic. If no active subscriptions and the
> > persistent_client_expiration duration is fulfilled, will the potential
> > present messages on this topic be removed and will also this topic be
> > removed?
> >
> > Also, if i connect to a topic having clean_session set to false, will
> this
> > topic be removed after the user drops his connection to it?
> >
> > Thanks in advance!
> >
> > Kind regards
> >
> > --
> > Mailing list: https://launchpad.net/~mosquitto-users
> > Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~mosquitto-users
> > More help   : https://help.launchpad.net/ListHelp
> >
>

References