Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14068

Retry subscribe to Salesforce event when server returns 503 Server too busy

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.23.4
    • Fix Version/s: 3.0.0.RC3, 3.0.0
    • Component/s: camel-salesforce
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Currently we are using the Salesforce component version 2.23.4.

      Every 3 hours the component needs to resubscribe due to expiring token (expected behavior). Sometimes however it fails on:

       

      org.apache.camel.component.salesforce.api.SalesforceException: Error subscribing to /event/CustomerLegalEntity__e: 403:denied_by_security_policy:subscribe_deniedorg.apache.camel.component.salesforce.api.SalesforceException: Error subscribing to /event/CustomerLegalEntity__e: 403:denied_by_security_policy:subscribe_denied at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$7.onMessage(SubscriptionHelper.java:406)

       

      It turns out (not in the logging) that the server returns additional information:

       

      {ext={sfdc={failureReason=503::Server is too busy. Please try your request again later.}}, ...}

       

      As described in the Salesforce documentation here: https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/streaming_handling_errors.htm

      the 503 Server too busy is a documented error that should/can be retried.

      It would greatly add to the resilience of our system if the Salesforce component would automatically retry a subscribe if failed due to a temporary error. The same backoff mechanism as for the reconnect could apply.

       

      Currently our workaround is to detect a 403 (more information is not available, like the failureReason) and restart the whole Camel subsystem.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                acosentino Andrea Cosentino
                Reporter:
                tomwetjens Tom Wetjens
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m