Skip to content

armeria-0.54.0

Choose a tag to compare

@trustin trustin released this 23 Oct 09:18

Breaking changes

  • #738 #775 Replaced com.linecorp.armeria.server.annotation.Optional with com.linecorp.armeria.server.annotation.Default.

New features

  • #18 #726 Added ThrottlingHttpService and ThrottlingRpcService, which reject incoming requests based on ThrottlingStrategy

    ServerBuilder sb = new ServerBuilder();
    sb.service("/foo", myService.decorate(
            ThrottlingHttpService.newDecorator(
                    new RateLimitingThrottlingStrategy<>(10.0 /* requests per second */))));
  • #678 #772 Added LoggingClientBuilder for more customization of LoggingClient

    HttpClient client = new HttpClientBuilder("http://example.com/")
            .decorator(new LoggingClientBuilder()
                    .requestLogLevel(LogLevel.INFO)
                    .successfulResponseLogLevel(LogLevel.INFO)
                    .failureResponseLogLevel(LogLevel.WARN)
                    .newDecorator())
            .build();
  • #689 Replaced HttpVfs entry cache to Caffeine cache

    • Cache metrics are exported under armeria.server.file.vfsCache.
  • #738 #775 Support Optional<T> parameter type for annotated services.

    public class MyAnnotatedService {
        @Post("/style_1")
        public AggregatedHttpMessage postWithOptional(@Param("type") Optional<String> type,
                                                      @Param("value") String value) {
            final String actualType = type.orElse("plaintext");
            ...
        }
    
        @Post("/style_2")
        public AggregatedHttpMessage postWithDefault(@Param("type") @Default("plaintext") String type,
                                                     @Param("value") String value) {
            ...
        }
    }
  • #785 Added ConcurrentCompositeMeterRegistry which works around the known scalability issue with Micrometer CompositeMeterRegistry. We will remove this class once we upgrade to Micrometer 1.0.0-rc.3 or above.

Improvements

  • #746 Annotated services will respond with 400 Bad Request rather than 500 Internal Server Error when a handler method throws an IllegalArgumentException.

Bug fixes

  • #754 #788 Server raises an exception when received a request with unsupported method
  • #767 #770 Spring Boot configuration raises NoSuchElementException when no MeterRegistry bean is present.
  • #780 #781 Client-side Thrift callback is not notified correctly for a void method with RetryingRpcClient.
  • #782 #783 NullPointerException is raised when one-way Thrift method fails with an exception.
  • #784 The default MeterIdFunction does not add the hostnamePattern tag.

Dependencies

  • Caffeine 2.5.5 -> 2.5.6
  • Checkstyle 8.2 -> 8.3
  • completable-futures -> 0.3.1 -> 0.3.2
  • Dropwizard Metrics 3.2.4 -> 3.2.5
  • gRPC 1.6.1 -> 1.7.0
  • Guava 23.0 -> 23.2
  • Hibernate Validator 5.4.1 -> 6.0.3
  • Jackson 2.8.9 -> 2.9.2
  • java.validation 1.0.0 -> 2.0.0
  • Javassist 3.21.0 -> 3.22.0
  • Jetty 9.4.6 -> 9.4.7
  • Kafka clients 0.11.0.0 -> 0.11.0.1
  • Mockito 2.8.47 -> 2.11.0
  • Netty 4.1.15 -> 4.1.16
  • Prometheus 0.0.26 -> 0.1.0
  • Spring Boot 1.5.6 -> 1.5.8
  • Tomcat 8.5.20 -> 8.5.23, 8.0.46 -> 8.0.47