Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5915

The retry handler used with HttpClient is not going to do what we expect

    XMLWordPrintable

    Details

      Description

      We usually expect to retry some operation if we receive a timeout from the request.

      If we use the DefaultRetryHandler from the HttpClient library that is not going to happen because that handler is not catching ConnectTimeoutException and/or SocketTimeoutException. So, when any of those exception happen, the operation will be aborted and the HttpClient is not going to "try again". If we want to "try again" we must implement a custom RetryHandler.

      For this reason only the "sequence-retry" is the only operation related with retries that is going to work on the PSM (or any other piece of code in OpenNMS that is using the DefaultRetryHandler with the HttpClient).

      If we have a definition with only one page that is a correct workaround, but if we have several pages, it is too expensive to use a sequence-retry instead of a simple retry, because the sequence-retry is going to start over with the whole test (i.e., test all the pages again), and the single retry is at page level (i.e., on each HttpGet/HttpPost request).

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: