You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "orpiske (via GitHub)" <gi...@apache.org> on 2023/06/08 06:09:41 UTC

[GitHub] [camel] orpiske commented on a diff in pull request #10286: CAMEL-19409: Allow clients to manually restart the subscription

orpiske commented on code in PR #10286:
URL: https://github.com/apache/camel/pull/10286#discussion_r1222500597


##########
components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java:
##########
@@ -290,6 +294,24 @@ protected void doStart() throws Exception {
         subscribed = true;
     }
 
+    /**
+     * If alsoStopSubscription is added, any underlying subscriptions will be stopped as well.
+     *
+     * SubscriptionHelper also logs out, so this will terminate the salesforce session as well.
+     *
+     * @param alsoStopSubscription
+     */
+    public void stop(boolean alsoStopSubscription) {
+        stop();
+        if (alsoStopSubscription) {
+            try {
+                subscriptionHelper.stop();
+            } catch (Exception e) {
+                LOG.warn("Failed to stop subscription due to: " + e.getMessage());

Review Comment:
   This should be: 
   
   ```
                   LOG.warn("Failed to stop subscription due to: {}", e.getMessage(), e);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org