Skip to content

armeria-0.56.0

Choose a tag to compare

@trustin trustin released this 22 Dec 12:28

New features

  • #866 #913 #915 @RequestConverter and @RequestObject annotation 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
  • #900 RequestLog can now contain one or more child RequestLogs, which is useful for recording the retry history of a request. From this release, RetryingRpcClient and RetryingHttpClient leverage this feature.
  • #904 HttpHeaders.contentType() which accesses the content-type header using MediaType

Improvements

  • #846 #889 The factory methods in HttpRequest and HttpResponse use 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 @Param annotation.
  • #899 #903 #905 #917 #918 Various performance and robustness improvements
  • #929 Port the recent upstream changes of the forked code

Bug fixes

  • #869 #900 RetryingHttpClient does not create a new context for each retry attempt.
  • #893 #896 HttpVfs implementation exposed by DocService generated poor meter tag.
  • #910 Incorrect CompletionStage handling 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 in AbstractHttpService have been deprecated in favor of the HttpResponse 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 HttpResponse implementation depending on his or her needs. See #846 and #889 for more information.

  • #909 DefaultHttpRequest and DefaultHttpResponse have been deprecated in favor of HttpRequest.streaming() and HttpResponse.streaming(). See the pull request for the detailed migration instructions.

  • #909 The HttpResponseWriter.respond() methods were all deprecated. Create a new HttpResponse using the factory methods of HttpResponse instead.

Breaking changes

  • #893 #896 HttpVfs is not a functional interface anymore, due to its new method meterTag() 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=true JVM option.
  • #907 @Converter annotation has been replaced by @ResponseConverter for consistency with other annotations such as @RequestConverter and @ExceptionHandler.
  • #920 ExceptionHandlerFunction interface 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