armeria-0.63.0
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);
-
@Paramand@Headerannotations can be used without value if an annotated service class was compiled with-parametersoption. #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
@Decoratorannotations. #1010 #1149-
Added
@LoggingDecoratorand@RateLimitingDecoratorfor 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-zookeeperhas been revamped to use Curator instead of vanilla ZooKeeper. #882 #1007 #1035 #1044- Added
ZooKeeperUpdatingListenerBuilderto expose more configuration parameters.
- Added
-
Revamped DNS-based service discovery. #1088 #1148
- Added
DnsTextEndpointGroupwhich retrieves the endpoint list fromTXTDNS records. - Added
DnsAddressEndpointGroupBuilder,DnsServiceEndpointGroupBuilderandDnsTextEndpointGroupBuilderto provide more configuration properties. - All DNS-based
EndpointGroupimplementations now respec the TTL values returned by a DNS server, rather than sending a DNS query per second.
- Added
-
HttpAuthServicecan be configured to use a non-standard header to extract authentication tokens. #1132ServerBuilder 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
AccessLogWriterslogs 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
NodeValueCodecwhen creating aZooKeeperUpdatingListener. #1035 DocServicedid not detect theGrpcServicebound withServerBuilder.service(ServiceWithPathMappings)correctly. #1136 #1138- gRPC client did not handle non-200 response status correctly. #1152
Breaking changes
ZooKeeperUpdatingListenerandZooKeeperEndpointGrouphave been refactored heavily with some factory methods removed. #1044DnsAddressEndpointGroupandDnsServiceEndpointGrouphave 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