Skip to content

armeria-0.59.0

Choose a tag to compare

@trustin trustin released this 09 Mar 03:33
e3ff014

New features

  • #1004 ServerListenerBuilder which allows functional composition of Runnables and Consumers for building a ServerListener

    ServerBuilder 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 ServerBuilder

    ServerBuilder 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 a BiFunction<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 connections
    • armeria.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 :authority header when sending a request.

Bug fixes

  • #995 DocService does not recognize a prefix-mapped THttpService.
  • #996 #998 ThrottlingService does not work with RpcResponse.
  • #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 @Nullable annotations throughout the API
  • #1022 ConcurrentModificationException in DefaultKeyedChannelPool.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 StreamMessageDuplicator to the subscriber.

Deprecations

  • #1018 The public constructors of HttpHealthCheckedEndpointGroup have been deprecated. Use the of() factory methods or HttpHealthCheckedEndpointGroupBuilder.
  • #1050 #1051 Most ServerBuilder.port() methods have been deprecated. Use Server.http() or https().
  • #1050 #1051 ServerBuilder.sslContext() methods have been deprecated. Use ServerBuilder.tls().

Breaking changes

  • #1006 Removed ZooKeeperEndpointGroup.Mode. Mode.IN_NODE_VALUE was broken by design, which leaves only Mode.IN_CHILD_NODES.
  • #1056 RetryStrategy.onStatus() now accepts BiFunction<HttpStatus, Throwable, Backoff> instead of Function<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