Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Publish and persistence issue(Publish and persistence issue)
Publish and persistence issue [message #1073123] Wed, 24 July 2013 07:23
Atique Khan is currently offline Atique KhanFriend
Messages: 1
Registered: July 2013
Junior Member
Hi there,

I am facing a strange problem while publishing to some topics. I have a web application which runs under JBoss 5. This application uses Eclipse Paho to publish to a broker as well as subscribe. The subscribe part is working fine without any issue. The problem is with publishing. My application starts to publish without any issue. If I restart the application from JBoss admin console then it fails to publish any further message to any topic. If I restart JBoss then it starts working again. The exception I am getting is
MqttException (0) - \home\itms\mqttproxy\MQTT_PROXY_PUB_1_36-tcp17216201837971\s-1.msg (The system cannot find the path specified)
	at org.eclipse.paho.client.mqttv3.MqttDefaultFilePersistence.put(
	at org.eclipse.paho.client.mqttv3.internal.ClientState.send(
	at org.eclipse.paho.client.mqttv3.internal.ClientComms.internalSend(
	at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(
	at org.eclipse.paho.client.mqttv3.MqttTopic.publish(
	at org.quwic.itms.mqtt.connection.MqttClientConnection.publish(
	at org.quwic.itms.mqtt.connection.MqttClientPublishingConnection.publish(

I have checked everything and there is no permission issue else it will not publish in the very first instance.

The code used for publishing is
ConnectionBean conOpt = new MqttConnectOptions();

String brokerUrl = "tcp://" + conBean.getHost() + ":" + conBean.getPort();
MqttClientPersistence dataStore = new MqttDefaultFilePersistence("/home/itms/mqttproxy");
client = new MqttClient(brokerUrl, conBean.getClientId(), dataStore);

String strMessage = "hello publishing";
MqttMessage message = new MqttMessage(strMessage.getBytes());
MqttTopic mqttTopic = client.getTopic(topicName[0]);
MqttDeliveryToken token = mqttTopic.publish(message);
if(token != null)

Could you please suggest what could be the problem. Any help will be highly appreciated.

Previous Topic:MQTT Java Client Binary Jar out of Step with GIT code
Next Topic:Trouble compiling Paho java plugin
Goto Forum:

Current Time: Wed Dec 02 10:17:09 GMT 2020

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

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

Back to the top