eclipse / paho.mqtt.rust

paho.mqtt.rust
Other
516 stars 102 forks source link

mqtt will create a diretory when connection, how to avoid? #178

Closed heliping closed 1 year ago

heliping commented 1 year ago

I found when created a mqtt client, there would be created a directory. I want to create many client, so the direcotries so many that take me unease. Is there any ways to avoid this?

image

fpagliughi commented 1 year ago

These contain the persistence data for the open connection, which uses File persistence by default. With File persistence, each client makes a directory for it's own data.

If you don't want to use persistence at all, specify PersistenceType::None in the CreateOptions when you create the client.

If you do want persistence, but don't want to make a separate directory per client, you can always create a custom persistence solution.

heliping commented 1 year ago

got it! thans, bro.