armeria-0.56.0
New features
- #866 #913 #915
@RequestConverterand@RequestObjectannotation which enable request conversion for an annotated service - #870 #894
RequestContext.newDerivedContext()method which creates a new context with the same properties (except the request log) from an existing context - #895 HTTP Access logging
- See the documentation to learn how to set it up with your logging framework.
- #900
RequestLogcan now contain one or more childRequestLogs, which is useful for recording the retry history of a request. From this release,RetryingRpcClientandRetryingHttpClientleverage this feature. - #904
HttpHeaders.contentType()which accesses thecontent-typeheader usingMediaType
Improvements
- #846 #889 The factory methods in
HttpRequestandHttpResponseuse highly-optimized dedicated Reactive Stream implementations for better performance and reduced memory footprint. - #890 A warning message is logged if a path variable of an annotated service does not have its corresponding
@Paramannotation. - #899 #903 #905 #917 #918 Various performance and robustness improvements
- #929 Port the recent upstream changes of the forked code
Bug fixes
- #869 #900
RetryingHttpClientdoes not create a new context for each retry attempt. - #893 #896
HttpVfsimplementation exposed byDocServicegenerated poor meter tag. - #910 Incorrect
CompletionStagehandling in annotated services - #924 Buffer leak when gRPC message parsing fails
- #885 Various miscellaneous fixes related with Reactive Stream implementations
Deprecations
-
#909 The
void doXXX()methods inAbstractHttpServicehave been deprecated in favor of theHttpResponse doXXX()methods: (Note the return type.)// Before public class MySerivce extends AbstractHttpService { @Override public void doGet(ServiceRequestContext ctx, HttpRequest req, HttpResponseWriter res) { res.respond(HttpStatus.OK, MediaType.PLAIN_TEXT_UTF8, "Hello, World!"); } } // After public class MySerivce extends AbstractHttpService { @Override public HttpResponse doGet(ServiceRequestContext ctx, HttpRequest req) { return HttpResponse.of(HttpStatus.OK, MediaType.PLAIN_TEXT_UTF8, "Hello, World!"); } }
This change gives you the freedom of choosing better
HttpResponseimplementation depending on his or her needs. See #846 and #889 for more information. -
#909
DefaultHttpRequestandDefaultHttpResponsehave been deprecated in favor ofHttpRequest.streaming()andHttpResponse.streaming(). See the pull request for the detailed migration instructions. -
#909 The
HttpResponseWriter.respond()methods were all deprecated. Create a newHttpResponseusing the factory methods ofHttpResponseinstead.
Breaking changes
- #893 #896
HttpVfsis not a functional interface anymore, due to its new methodmeterTag()which is used as a tag value of the cache metrics. - #902 HTTP/1 request pipelining has been disabled by default for better out-of-the-box compatibility with HTTP/1-only servers. You can re-enable it by specifying the
-Dcom.linecorp.armeria.defaultUseHttp1Pipelining=trueJVM option. - #907
@Converterannotation has been replaced by@ResponseConverterfor consistency with other annotations such as@RequestConverterand@ExceptionHandler. - #920
ExceptionHandlerFunctioninterface has been revamped for more flexibility. - #923
HttpRequest.isKeepAlive()has been removed because it had no meaning and effect for most cases.
Dependencies
- Brave 4.10.0 -> 4.13.1
- Netty: 4.1.17.Final -> 4.1.19.Final
- Reactive Streams 1.0.1 -> 1.0.2
- Spring Boot 1.5.8.RELEASE -> 1.5.9.RELEASE
- Tomcat 8.5.23 -> 8.5.24 and 8.0.47 -> 8.0.48
Known issues
-
Netty 4.1.19.Final has a data corruption issue when epoll transport is used. Specify the following JVM option to disable epoll transport and work around this problem until Netty 4.1.20.Final is released:
-Dcom.linecorp.armeria.useEpoll=false