bkeevil / mqtt

MQTT Client/Server Componet Set for FPC/Lazarus
49 stars 18 forks source link

Add a way to set the persistent property of a subscription in the server test app #5

Closed bkeevil closed 6 years ago

bkeevil commented 6 years ago

On the subscriptions tab there should be a checkbox column titled "persistent" that updates the persistent property of a subscription. A subscription marked persistent should be saved to a server configuration file.

There is a mechanism to load/save persistent subscriptions to a stream but it is not being used. See TMQTTSubscriptionList.LoadFromStream/SaveToStream

It would probably be better to load/save this as an inifile or in some other text format.

The command line options and command line help needs to be updated with a way to specify a persistent subscriptions file.

The startup process needs to be modified to load a persistent subscriptions file at startup.

bkeevil commented 6 years ago

I have removed the persistent property of Subscription for now. At a later time, if persistent subscriptions are required, I think they should be implemented using a separate TComponent with a TCollection property.