You're seeing the release note of an old version. Check out the latest release note.
v0.89.0
July 29, 2019
New features
-
You can now specify decorators for all services in a
Serverin a functional way. #1882 #1900ServerBuilder sb = new ServerBuilder();sb.service(...);// After:sb.decorator((delegate, ctx, req) -> {...return delegate.serve(ctx, req);});// Before:sb.decorator(delegate -> new SimpleServiceDecorator<HttpRequest, HttpResponse>(delegate) {@Overridepublic HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {...return delegate().serve(ctx, req);}}); -
You can now use
HealthCheckServicewhich has richer functionality than its predecessorHttpHealthCheckService. #1878ServerBuilder sb = new ServerBuilder();sb.service("/internal/l7check",HealthCheckService.builder().checkers(...).healthyResponse(...).unhealthyResponse(...).longPolling(Durations.ofMinutes(1)).updatable(true).build());- Long-polling query support
- You can wait until the server becomes healthy or unhealthy and get notified immediately.
- Easy customization of healthy/unhealthy responses
- Easy customization of update request handler
- Long-polling query support
-
You now know exact host you are sending your request to when using Armeria client. #1917
- It was previously not possible when you specified an
EndpointGroupas the destination. - Therefore,
ClientRequestContext.endpoint()may returnnullsince this release when Armeria failed to determine the destination host. ClientRequestContext.endpointSelector()has been added so that you still know whichEndpointGroupyou are connecting to.
- It was previously not possible when you specified an
-
BraveClientandBraveServicenow acceptHttpTracingas well asTracing. #1223 #1906Tracing tracing = ...;// Server-sideServerBuilder sb = new ServerBuilder();//// Beforesb.service("/", myService.decorate(BraveService.newDecorator(tracing)));//// AfterHttpTracing httpTracing = HttpTracing.create(tracing);sb.service("/", myService.decorate(BraveService.newDecorator(httpTracing)));// Client-sideHttpClientBuilder cb = new HttpClientBuilder(...);//// Beforecb.decorator(BraveClient.newDecorator(tracing, "myBackend"));//// Aftercb.decorator(BraveClient.newDecorator(httpTracing.clientOf("myBackend"))); -
You can now create a decorating
ServiceorClientin a less verbose way by extending newSimpleDecorating*classes. #1881 #1925SimpleDecoratingHttpService extends SimpleDecoratingService<HttpRequest, HttpResponse>SimpleDecoratingRpcService extends SimpleDecoratingService<RpcRequest, RpcResponse>SimpleDecoratingHttpClient extends SimpleDecoratingClient<HttpRequest, HttpResponse>SimpleDecoratingRpcClient extends SimpleDecoratingClient<RpcRequest, RpcResponse>
-
RpcServicehas been added for your convenience. #1881 #1925RpcService extends Service<RpcRequest, RpcResponse>
Improvements
- The output type of
RequestLogsanitizer functions has been relaxed to?so that a user can write much simpler and more efficient sanitizer function. #1810 #1879// BeforeFunction<HttpHeaders, HttpHeaders> sanitizer = headers -> {return headers.toBuilder().removeAndThen("authorization").build();};// AfterFunction<HttpHeaders, Object> sanitizer = headers -> {// No need to construct a new HttpHeaders object.return headers.toBuilder().removeAndThen("authorization").toString();};// Even more efficientlyFunction<HttpHeaders, Object> sanitizer = headers -> "sanitized!"; - A glob path mapping is not translated into a regex path mapping when combined with path prefix anymore. #1929
ByteBufHttpData.toInputStream()does not perform extra memory copy anymore. #1918 #1919
Bug fixes
- Armeria client now sends
OPTIONS * HTTP/1.1instead ofHEAD / HTTP/1.1, so that the initial protocol upgrade does not trigger business logic when a server has business logic bound at/. #1895 #1896 - Response content is not sanitized twice anymore. #1879
- gRPC message compression is now enabled by default on the server side, so that the default behavior matches that of the upstream implementation. #1885 #1889
- The
max-ageattribute in aset-cookieheader is now handled correctly when using Spring WebFlux. #1904 - Fixed a bug where the base URL of the received request is set incorrectly when using Spring WebFlux. #1904
HttpHealthCheckedEndpointdoes not leak connections and requests afterclose()is called. #1899BraveClientdoes not triggerRequestLogAvailabilityExceptionanymore when the request being traced has failed without sending any data. #1911 #1912@ConsumesJsonannotation now accepts JSON documents with any charsets rather than onlyUTF-8. #1920- The
IllegalStateExceptionraised bypushIfAbsent()is now propagated properly to theCompletableFuturecreated byRequestContext.makeContextAware(). #1920
Deprecations
HttpHealthCheckServiceandSettableHttpHealthCheckServicehave been deprecated in favor ofHealthCheckServiceand its builder. #1878
Breaking changes
ClientRequestContext.endpoint()may returnnullsince this release. #1917- The
Endpointreturned byClientRequestContext.endpoint()now always refers to a single host, not anEndpointGroup. #1917- Use
ClientRequestContext.endpointSelector().group()to retrieve the relatedEndpointGroup.
- Use
Dependencies
- gRPC 1.21.0 -> 1.22.1
- Netty 4.1.37 -> 4.1.38
- Tomcat 9.0.21 -> 9.0.22, 8.5.42 -> 8.5.43
Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:










