Croway commented on code in PR #22874:
URL: https://github.com/apache/camel/pull/22874#discussion_r3169328095
##########
components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java:
##########
@@ -165,15 +171,30 @@ private MessageListener createConnectionListener() {
LOG.debug("Attempting login...");
session.attemptLoginUntilSuccessful(backoffIncrement,
maxBackoff);
}
- if (message.getAdvice() == null ||
"none".equals(message.getAdvice().get("reconnect"))) {
- LOG.debug("Advice == none, so handshaking");
+ if (reconnectAdvice != null &&
!"retry".equals(reconnectAdvice)) {
+ LOG.debug("Reconnect advice [{}] on failed connect,
initiating handshake", reconnectAdvice);
+ client.handshake();
+ } else if (isTemporaryError(message)) {
+ LOG.debug("Initiating handshake after temporary error:
{}", message);
Review Comment:
In this case, we might need some backoff, try to reuse the existing
`handshakeBackoff + backoffIncrement` pattern already in
[subscriptionFailed()](https://github.com/shaipan/camel/blob/4b24b1b4053055383307546304fd598e77dc569e/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L233-L295)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]