Uploaded image for project: 'Data Collection, Analytics, and Events'
  1. Data Collection, Analytics, and Events
  2. DCAEGEN2-2500

PM-Mapper waits 1s after sending each event to message router

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Guilin Release
    • Guilin Release, Honolulu Release, Guilin Maintenance Release 1
    • None
    • None

      Piece of code can be found in RequestSender class

      while (!status && attempts <= MAX_RETRIES) {
          final URL url = new URL(urlString);
          final HttpURLConnection connection = getHttpURLConnection(method, url, invocationID, requestID);
      
          if ("https".equalsIgnoreCase(url.getProtocol())) {
              HttpsURLConnection.setDefaultSSLSocketFactory(SSLContext.getDefault().getSocketFactory());
          }
      
          if (!encodedCredentials.isEmpty()) {
              connection.setRequestProperty("Authorization", "Basic " + encodedCredentials);
          }
      
          if (!body.isEmpty()) {
              setMessageBody(connection, body);
          }
          result = getResult(attempts, connection);
          status = !isWithinErrorRange(connection.getResponseCode());
          attempts++;
          Thread.sleep(RETRY_INTERVAL);
      }
      

      Thread.sleep(RETRY_INTERVAL) is called even if sending was successful, so when file received by PM-Mapper contains for example 60 events it would take at least 60 seconds to process it.

            rjanecze rjanecze
            rjanecze rjanecze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: