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 2020/02/19 19:21:55 UTC
[camel] branch master updated: CAMEL-14590 Camel-Pulsar consumer
calls unsubscribe on doStop/doSuspend,
potentially deleting subscription (#3591)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 4301485 CAMEL-14590 Camel-Pulsar consumer calls unsubscribe on doStop/doSuspend, potentially deleting subscription (#3591)
4301485 is described below
commit 430148572d4bcb7953bc1ec1baccef18752db5de
Author: Connor McAuliffe <co...@toasttab.com>
AuthorDate: Wed Feb 19 14:21:46 2020 -0500
CAMEL-14590 Camel-Pulsar consumer calls unsubscribe on doStop/doSuspend, potentially deleting subscription (#3591)
* CAMEL-14590: make unsubscribe on stop configurable for pulsar consumers
* CAMEL-14590 remove consumer.unsubscribe() call altogether
---
.../main/java/org/apache/camel/component/pulsar/utils/PulsarUtils.java | 1 -
.../java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java | 2 --
2 files changed, 3 deletions(-)
diff --git a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/PulsarUtils.java b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/PulsarUtils.java
index 7698152..81108e2 100644
--- a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/PulsarUtils.java
+++ b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/PulsarUtils.java
@@ -36,7 +36,6 @@ public final class PulsarUtils {
Consumer<byte[]> consumer = consumers.poll();
if (consumer != null) {
try {
- consumer.unsubscribe();
consumer.close();
} catch (Exception e) {
// ignore during stopping
diff --git a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
index 5cd1a4c..f36f1e3 100644
--- a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
+++ b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/utils/PulsarUtilsTest.java
@@ -56,7 +56,6 @@ public class PulsarUtilsTest {
PulsarUtils.stopConsumers(consumers);
- verify(consumer).unsubscribe();
verify(consumer).close();
}
@@ -68,7 +67,6 @@ public class PulsarUtilsTest {
consumer.close();
- verify(consumer).unsubscribe();
verify(consumer).close();
}
}