You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/11/17 16:11:12 UTC
[2/3] stratos git commit: mqtt re-con contd.
mqtt re-con contd.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/725d8919
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/725d8919
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/725d8919
Branch: refs/heads/master
Commit: 725d8919069ac1a4fd235c3c33c80edda79a41c0
Parents: 570d320
Author: Isuru Haththotuwa <is...@apache.org>
Authored: Mon Nov 17 19:33:56 2014 +0530
Committer: Isuru Haththotuwa <is...@apache.org>
Committed: Mon Nov 17 19:33:56 2014 +0530
----------------------------------------------------------------------
.../stratos/messaging/broker/connect/MqttTopicSubscriber.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/725d8919/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/MqttTopicSubscriber.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/MqttTopicSubscriber.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/MqttTopicSubscriber.java
index 00349b5..26b6fdf 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/MqttTopicSubscriber.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/MqttTopicSubscriber.java
@@ -70,6 +70,9 @@ public class MqttTopicSubscriber extends TopicSubscriber {
// generate a unique client id for each subscriber & publisher with the distributed nature of stratos.
// Reliable message delivery is managed by topic subscriber and publisher.
connectOptions.setCleanSession(true);
+ // TODO: test this
+ // set the keep alive interval less than MB's inactive connection detection time
+ //connectOptions.setKeepAliveInterval(15);
mqttClient.connect(connectOptions);
} catch (Exception e) {
String message = "Could not connect to message broker";