Skip to content

armeria-0.63.0

Choose a tag to compare

@trustin trustin released this 25 Apr 02:12
442bb73

New features

  • Added more concise variants of HttpResponse.of() #1142

    // Defaults to HttpStatus.OK and MediaType.PLAIN_TEXT_UTF_8.
    HttpResponse.of("Hello, world!");
    HttpResponse.of("Hello, %s!", name);
    // Defaults to HttpStatus.OK.
    HttpResponse.of(MediaType.PLAIN_TEXT_UTF_8, "Hello, world!");
    HttpResponse.of(MediaType.PLAIN_TEXT_UTF_8, "Hello, %s!", name);
  • @Param and @Header annotations can be used without value if an annotated service class was compiled with -parameters option. #570 #1147

    // Before
    public class MyAnnotatedService {
        @Get("/get/:item")
        public String getItem(@Param("item") item) { .. }
        //                    ~~~~~~~~~~~~~~~~~~~ Have to type 'item' twice.
    }
    // After
    public class MyAnnotatedService {
        @Get("/get/:item")
        public String getItem(@Param item) { .. } 
        //                    ~~~~~~~~~~~ No need to type 'item' twice.
    }  
  • A user can define his or her own decorator annotation instead of using @Decorator annotations. #1010 #1149

    • Added @LoggingDecorator and @RateLimitingDecorator for a demonstrative purpose.

      public class MyAnnotatedService {
          @Get("/get/:product")
          @LoggingDecorator(successfulResponseLogLevel = LogLevel.INFO, samplingRate = 0.75f)
          @RateLimitingDecorator(1000.0f) // Up to 1000 req/s
          public String getProduct(@Param product) { .. }
      }
    • See Decorating an annotated service with a custom decorator annotation for more information.

  • armeria-zookeeper has been revamped to use Curator instead of vanilla ZooKeeper. #882 #1007 #1035 #1044

    • Added ZooKeeperUpdatingListenerBuilder to expose more configuration parameters.
  • Revamped DNS-based service discovery. #1088 #1148

    • Added DnsTextEndpointGroup which retrieves the endpoint list from TXT DNS records.
    • Added DnsAddressEndpointGroupBuilder, DnsServiceEndpointGroupBuilder and DnsTextEndpointGroupBuilder to provide more configuration properties.
    • All DNS-based EndpointGroup implementations now respec the TTL values returned by a DNS server, rather than sending a DNS query per second.
  • HttpAuthService can be configured to use a non-standard header to extract authentication tokens. #1132

    ServerBuilder sb = new ServerBuilder();
    sb.service("/my_service",
               myService.decorate(new HttpAuthServiceBuilder()
                       .addBasicAuth(myAuthrorizer, HttpHeadersNames.of("my-custom-header"))
                       .newDecorator()));
  • The access log writer implementations provided by AccessLogWriters logs RPC method name as a URI fragment. #1157

  • Added SSLeay PKCS#5 private key format support. #1144

Bug fixes

  • It was impossible to specify a NodeValueCodec when creating a ZooKeeperUpdatingListener. #1035
  • DocService did not detect the GrpcService bound with ServerBuilder.service(ServiceWithPathMappings) correctly. #1136 #1138
  • gRPC client did not handle non-200 response status correctly. #1152

Breaking changes

  • ZooKeeperUpdatingListener and ZooKeeperEndpointGroup have been refactored heavily with some factory methods removed. #1044
  • DnsAddressEndpointGroup and DnsServiceEndpointGroup have been refactored heavily with some factory methods removed. #1148

Dependencies

  • Bouncy Castle 1.59 (new)
  • Brave 4.18.2 -> 4.19.1
  • Curator 4.0.1 (new)
  • Netty 4.1.23 -> 4.1.24
  • protobuf-jackson 0.1.1 -> 0.2.1
  • Spring Boot 1.5.11 -> 1.5.12
  • Tomcat 9.0.6 -> 9.0.7, 8.5.29 -> 8.5.30, 8.0.50 -> 8.0.51
  • Zipkin 2.7.0 -> 2.7.1