1.28.0 release notes

12th April 2024

🌟 New features

  • You can now create a Spring HTTP Interface backed by Armeria's WebClient. #5370
    WebClient webClient = ...;
    ArmeriaHttpExchangeAdapter adapter = ArmeriaHttpExchangeAdapter.of(webClient);
    MyService myService = HttpServiceProxyFactory.builderFor(adapter)
      .build()
      .createClient(MyService.class);
    myService.hello();
  • You can use KubernetesEndpointGroup to perform client-side load-balancing when sending requests to a K8s cluster. #4497 #5001
    KubernetesClient kubernetesClient = new KubernetesClientBuilder().build();
    EndpointGroup endpointGroup = KubernetesEndpointGroup
      .builder(kubernetesClient)
      .namespace("default")
      .serviceName("my-service")
      .build();
    WebClient.of(HTTP, endpointGroup).get("/");
  • You can now conditionally deserialize a JSON response depending on a predicate. #4382 #5002
    ResponseEntity<MyResponse> response =
      RestClient
        .of("http://my-endpoint.com")
        .get("/")
        .execute(ResponseAs.<MyResponse>json(SuccessMessage.class, !res -> res.status().isError())
                           .orElseJson(EmptyMessage.class, res -> res.status().isInformational())
                           .orElseJson(ErrorMessage.class)).join();
  • You can specify allowed CORS origins via regular expressions or predicates. #4982
    CorsService.builderForOriginRegex(".*example.*")
               .andForOrigin(origin -> origin.contains("armeria"))
  • You can specify a Micrometer DistributionStatisticConfig for MetricCollectingClient and MetricCollectingService. #4781 #4829
    DistributionStatisticConfig config = ...;
    MetricCollectingService.builder(MeterIdPrefixFunction.ofDefault("test"))
                           .distributionStatisticConfig(config)
  • HealthChecker.ofCpu() can be used to reflect CPU load in health check status. #4673
    Server.builder()
          .service("/hc", HealthCheckService.of(HealthChecker.ofCpu(0.5, 0.5), ...));
  • You can flatten multiple StreamMessages using StreamMessage.flatMap(). #3966 #4227
  • Armeria's Spring integration now registers ServerErrorHandler type beans automatically. #5443 #5446
    @Bean
    public ServerErrorHandler serverErrorHandler() {
      return myServerErrorHandler;
    }
  • OAuth 2.0 modules have been refactored #5476
  • Armeria JARs are now compatible with Java modules. #5543
  • ServerBuilder.virtualHost() returns a cached VirtualHostBuilder if available. #5418
    assert Server.builder().virtualHost("a.com") ==
        Server.builder().virtualHost("a.com");
  • AuthService now records metrics for authentication results. #5074 #5017
  • You can add custom details when throwing an ArmeriaStatusException in an AbstractUnsafeUnaryGrpcService. #4306 #4341
  • XdsEndpointGroup now supports Strict DNS and health checking. #5503
  • XdsBootstrap now supports SelfConfigSource. #5459
  • AccessLogWriter.log() is now called with the ServiceRequestContext set on the calling thread. #5500
  • You can now pass RequestOnlyLog.authenticatedUser() to Logback's MDC easily using authenticated.user. #5499

🛠️ Bug fixes

☢️ Breaking changes

📈 Improvements

📃 Documentation

  • Armeria's REST, gRPC and Thrift tutorials has been revamped with a new format. #5445
  • A wrong import statement in the code examples has been fixed. #5560
  • CircuitBreaker documentation has been updated to avoid usage of deprecated methods. #5472
  • Broken links in Kotlin and context propagation related documents have been updated. #5437

🏚️ Deprecations

🙌 Miscellaneous

  • An Armeria project icon for IntelliJ has been added. #5467

⛓ Dependencies

🚨 Please use at least Netty 4.1.108.Final with this release.

  • Brave 6.0.0 → 6.0.2
  • Brotli4j 1.15.0 → 1.16.0
  • java-control-plane 1.0.42 → 1.0.44
  • Dropwizard 2.1.10 → 2.1.12
  • Dropwizard Metrics 4.2.24 → 4.2.25
  • Eureka 2.0.1 → 2.0.2
  • fastUtil 8.5.12 → 8.5.13
  • gRPC-Java 1.61.0 → 1.63.0
  • Guava 33.0.0-jre → 33.1.0-jre
  • Jackson 2.16.1 → 2.17.0
  • JCTools 4.0.2 → 4.0.3
  • Jetty
    • 9.4.52.v20230823 → 9.4.54.v20240208
    • 10.0.19 → 10.0.20
    • 11.0.19 → 11.0.20
    • 12.0.5 → 12.0.8
  • Kotlin 1.9.22 → 1.9.23
  • Kubernetes Client 6.10.0 → 6.11.0
  • Micrometer 1.12.2 → 1.12.4
  • Micrometer Tracing 1.2.2 → 1.2.4
  • Netty 4.1.106.Final → 4.1.108.Final
  • Netty io_uring 0.0.24.Final → 0.0.25.Final
  • protobuf-jackson 2.2.0 → 2.5.0
  • Reactor 3.6.2 → 3.6.4
  • RESTEasy 5.0.7.Final → 5.0.9.Final
  • Retrofit 2.9.0 → 2.11.0
  • Sangria 4.0.2 → 4.1.0
  • Scala
    • 2.12.18 → 2.12.19
    • 2.13.12 → 2.13.13
    • 3.3.0 → 3.4.1
  • Spring 6.1.3 → 6.1.5
  • Spring-Boot 3.2.2 → 3.2.4
  • Tomcat
    • 8.5.98 → 8.5.100
    • 9.0.85 → 9.0.87
    • 10.1.18 → 10.1.20

🙇 Thank you