You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/11/04 09:45:36 UTC
[camel] branch camel-2.20.x updated (6a4c2d2 -> 63c1c23)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 6a4c2d2 Update conenctor examples
new 6dd206b CAMEL-11628: camel-mqtt - Fix in MQTTEndpoint for connection loop bug.
new 63c1c23 Fixed CS
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].
[camel] 01/02: CAMEL-11628: camel-mqtt - Fix in MQTTEndpoint for
connection loop bug.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6dd206b6a08f71620dcbdf87e2d0c6b10881490c
Author: Brad Powell <ba...@sbcglobal.net>
AuthorDate: Fri Nov 3 11:36:56 2017 -0500
CAMEL-11628: camel-mqtt - Fix in MQTTEndpoint for connection loop bug.
---
.../main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
index 511c3c5..3dce618 100644
--- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
+++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
@@ -231,6 +231,12 @@ public class MQTTEndpoint extends DefaultEndpoint implements AsyncEndpoint {
}
protected void createConnection() {
+ if (connection != null) {
+ // In connect(), in the connection.connect() callback, onFailure() doesn't seem to ever be called, so forcing the disconnect here.
+ // Without this, the fusesource MQTT client seems to be holding the old connection object, and connection contention can ensue.
+ connection.disconnect(null);
+ }
+
connection = configuration.callbackConnection();
connection.listener(new Listener() {
@@ -331,7 +337,7 @@ public class MQTTEndpoint extends DefaultEndpoint implements AsyncEndpoint {
}
- public void onFailure(Throwable value) {
+ public void onFailure(Throwable value) { // this doesn't appear to ever be called
LOG.warn("Failed to connect to " + configuration.getHost() + " due " + value.getMessage());
promise.onFailure(value);
connection.disconnect(null);
--
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.
[camel] 02/02: Fixed CS
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 63c1c230775cff0dc053f19813ff93995c8a0fb9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 4 10:44:52 2017 +0100
Fixed CS
---
.../src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
index 3dce618..72a8e61 100644
--- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
+++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
@@ -236,7 +236,7 @@ public class MQTTEndpoint extends DefaultEndpoint implements AsyncEndpoint {
// Without this, the fusesource MQTT client seems to be holding the old connection object, and connection contention can ensue.
connection.disconnect(null);
}
-
+
connection = configuration.callbackConnection();
connection.listener(new Listener() {
--
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.