Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » How to resolve "Persistence already in use (32200)"
How to resolve "Persistence already in use (32200)" [message #1699138] Mon, 22 June 2015 02:54 Go to next message
supot numnaun is currently offline supot numnaunFriend
Messages: 1
Registered: June 2015
Junior Member

I use mqttv3 client(java), when i publish message (height frequency) i get error "Persistence already in use (32200)"

Thank you.
Here my code
try {
            MqttClient client = new MqttClient("tcp://localhost:1884", MqttAsyncClient.generateClientId());
            client.setCallback(new MqttCallback() {
				public void messageArrived(String arg0, MqttMessage arg1) throws Exception {"messageArrived");
				public void deliveryComplete(IMqttDeliveryToken arg0) {"deliveryComplete");
				public void connectionLost(Throwable arg0) {"connectionLost");
MqttClient before connecting to broker
            client.publish(topicName, payload, qos, true);

            String time = new Timestamp(System.currentTimeMillis()).toString();
  "Publishing at:%s to Topic:%s Message:%s", time, topicName, new String(payload)));
        } catch (MqttException ex) {
        	throw new RuntimeException(ex.getMessage());
        } catch (InterruptedException ex) {
Re: How to resolve "Persistence already in use (32200)" [message #1702272 is a reply to message #1699138] Tue, 21 July 2015 09:05 Go to previous message
Ian Craggs is currently offline Ian CraggsFriend
Messages: 76
Registered: March 2013
If you are disconnecting and connecting each time you publish, then the disconnect may be taking a little while before you try to reconnect again. If you are publishing "with high frequency" then it would be better to keep a connection open, and just call publish when you want to send a message.
Previous Topic:Java client: Trouble connecting to CloudMQTT server with username password
Next Topic:Paho Java, M2JE problem, compliling my program
Goto Forum:

Current Time: Wed Dec 02 10:43:51 GMT 2020

Powered by FUDForum. Page generated in 0.01640 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top