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 2025/02/25 08:43:35 UTC

(camel) branch camel-4.10.x updated: CAMEL-21740: added error handling for corrupt replay ids

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.10.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.10.x by this push:
     new 546a5016f05 CAMEL-21740: added error handling for corrupt replay ids
546a5016f05 is described below

commit 546a5016f05ce7bfc5a663bfd6ae6a0bf1d4d3e0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Feb 25 09:43:09 2025 +0100

    CAMEL-21740: added error handling for corrupt replay ids
---
 .../salesforce/internal/client/PubSubApiClient.java          | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/PubSubApiClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/PubSubApiClient.java
index 337f137f95e..72ae4d5963a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/PubSubApiClient.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/PubSubApiClient.java
@@ -346,10 +346,14 @@ public class PubSubApiClient extends ServiceSupport {
                             LOG.debug("logged in {}", consumer.getTopic());
                         }
                         case PUBSUB_ERROR_CORRUPTED_REPLAY_ID -> {
-                            LOG.error("replay id: " + replayId
-                                      + " is corrupt. Trying to recover by resubscribing with LATEST replay preset");
-                            replayId = null;
-                            initialReplayPreset = ReplayPreset.LATEST;
+                            if (initialReplayPreset == ReplayPreset.CUSTOM) {
+                                LOG.error("replay id: " + replayId + " is corrupt.");
+                            } else {
+                                LOG.error("replay id: " + replayId
+                                          + " is corrupt. Trying to recover by resubscribing with LATEST replay preset");
+                                replayId = null;
+                                initialReplayPreset = ReplayPreset.LATEST;
+                            }
                         }
                         default -> LOG.error("unexpected errorCode: {}", errorCode);
                     }