Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Java best practive having subscriber + publisher object

Hi all,

I have a subscriber thread and wanted to implement a static publisher.
Now I am getting a "Persistence already in use (32200)" error, because I
am using the same Persistence.

Therefor I have some questions now:
What is "MqttDefaultFilePersistence dataStore = new
MqttDefaultFilePersistence(tmpDir);" good for?
Do I really need this?

And last but not least: What is a good handling to get around with it? I
read something about MqttDefaultFilePersistence().open() ... but don't
have an idea how to handle/ use it.

If you have concerns about my usage, I am free to change it. A little
example would be great. Maybe you have some good example blog entry or
To get a better view on it, here are my subscriber
( and publisher
( (or what I have
by now).

Thanks in advance for your help.

Best regards

Back to the top