armeria-0.59.0
New features
-
#1004
ServerListenerBuilderwhich allows functional composition ofRunnables andConsumers for building aServerListenerServerBuilder sb = new ServerBuilder(); sb.serverListener(new ServerListenerBuilder() .addStartingCallback(server -> { ... }) .addStoppingCallback(server -> { ... }) .build());
-
#1018 Allow session protocol to be specified for
HttpHealthCheckedEndpointGroup.HttpHealthCheckedEndpointGroup healthCheckedGroup = new HttpHealthCheckedEndpointGroupBuilder(delegateGroup, "/internal/l7check") .protocol(SessionProtocol.HTTPS) .retryInterval(Duration.ofSeconds(5)) .build();
-
#1050 #1051 More concise server port and TLS configuration in
ServerBuilderServerBuilder sb = new ServerBuilder(); // Before sb.port(8080, SessionProtocol.HTTP); sb.port(8443, SessionProtocol.HTTPS); sb.sslContext(SessionProtocol.HTTPS, keyCertChainFile, keyFile); // After sb.http(8080); sb.https(8443); sb.tls(keyCertChainFile, keyFile);
-
#1056
RetryStrategy.onStatus()now accepts aBiFunction<HttpStatus, Throwable, Backoff>so that a user can handle both response status and exception.HttpClient client = new HttpClientBuilder("http://example.com/") .decorator(RetryingHttpClient.newDecorator( RetryStrategy.onStatus((status, cause) -> { if (cause != null) { return backoffA; } if (status.codeClass() == HttpStatusClass.SERVER_ERROR) { return backoffB; } return null; // Do not retry. })); .build();
-
#1058 Add more server-side metrics:
armeria.server.numConnections- the number of open connectionsarmeria.server.pendingResponses- the number of pending responses during graceful shutdown
Improvements
- #1012 Reduced the number of memory copies on the client-side.
- #1017 Allow overriding
:authorityheader when sending a request.
Bug fixes
- #995
DocServicedoes not recognize a prefix-mappedTHttpService. - #996 #998
ThrottlingServicedoes not work withRpcResponse. - #1000 1031
MeterIdPrefixFunction.ofDefault()doesn't collect service level metrics for unframed gRPC requests - #1008 Lack of armeria essential artifacts in the Maven BOM
- #1013 #1056
RetryStrategy.on*Status()should allow retry on exceptions rather than just HTTP status. - #1014 #1024 #1027 Interoperability issues with Linkerd
- #1019 Set previously health-checked endpoints that don't exist anymore to 'unhealthy'.
- #1020 Don't notify the gRPC server listener of client closure if it will be notified of server closure.
- #1021 #1059 Add missing
@Nullableannotations throughout the API - #1022
ConcurrentModificationExceptioninDefaultKeyedChannelPool.doClose() - #1028 #1030 Close in-progress responses when channel is closed.
- #1037 #1064 Fix backpressure implementation of outbound gRPC traffic
- #1047 gRPC stream is not canceled when client cancels.
- #1062 Make sure gRPC stub handlers always run on an event loop thread.
- #1065 Propagate the exceptions raised in
StreamMessageDuplicatorto the subscriber.
Deprecations
- #1018 The public constructors of
HttpHealthCheckedEndpointGrouphave been deprecated. Use theof()factory methods orHttpHealthCheckedEndpointGroupBuilder. - #1050 #1051 Most
ServerBuilder.port()methods have been deprecated. UseServer.http()orhttps(). - #1050 #1051
ServerBuilder.sslContext()methods have been deprecated. UseServerBuilder.tls().
Breaking changes
- #1006 Removed
ZooKeeperEndpointGroup.Mode.Mode.IN_NODE_VALUEwas broken by design, which leaves onlyMode.IN_CHILD_NODES. - #1056
RetryStrategy.onStatus()now acceptsBiFunction<HttpStatus, Throwable, Backoff>instead ofFunction<HttpStatus, Backoff>. See the 'New features' section above for more information.
Dependencies
- Caffeine 2.6.1 -> 2.6.2
- gRPC 1.9.0 -> 1.10.0
- Micrometer 1.0.0-rc.9 -> 1.0.1
- Netty 4.1.21 -> 4.1.22
- Prometheus 0.2.0 -> 0.3.0
- Brave 4.14.3 -> 4.17.2
- Zipkin 2.4.5 -> 2.5.1
- Tomcat 8.5.27 -> 8.5.28 and 8.0.49 -> 8.0.50