Skip to content

Implement retry handling in Jetty Transporter #2239

Open

Description

@kwin

New feature, improvement proposal

Currently the retry configuration is disregarded in the Jetty Transporter. Unfortunately the Jetty HTTP Client API does not come with a hook for retries. So retries need be manually established like this:

int attempt = 0;
    while (true) {
        try {
            return client.newRequest(url)
                         .timeout(5, TimeUnit.SECONDS)
                         .send();
        } catch (ExecutionException | TimeoutException e) {
            if (++attempt >= maxAttempts) {
                throw e;
            }
            Thread.sleep(200L * (1L << attempt)); // 400ms, 800ms, ...
        }
    }

Activity

  1. changed the title [-]Implement retry handling in Jetty[/-] [+]Implement retry handling in Jetty Transporter[/+] on Oct 28, 2026
  2. sakshichitnis27 commented on Oct 29, 2026

    @sakshichitnis27

    Hi! I opened a PR for this: #2242

    The Jetty HttpClient has no retry hook, so it adds a retry loop in JettyTransporter for HEAD, GET and PUT, driven by the existing aether.connector.http.retryHandler.* settings. I enabled the shared retry tests for Jetty (they fail on master) and added a few GET/PUT tests. I couldn't find another open PR for this after checking the timeline and a PR search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions