Armeria v0.98.3 Release Notes

Release Date: 2020-02-25 // about 4 years ago
  • ๐Ÿฑ ๐Ÿ’ฎ What is Armeria?

    Armeria is an open-source asynchronous HTTP/2 RPC/REST client/server library built on top of Java 8, Netty, Thrift and gRPC. Its primary goal is to help engineers build high-performance asynchronous microservices that use HTTP/2 as a session layer protocol. Visit the official web site and follow @armeria_project to check out many cool features you can't find in the official gRPC/Thrift implementation or other microservice frameworks.

    ๐Ÿฑ ๐ŸŒŸ New features

    • RequestContextExporter and RequestContextExportingAppender for Logback can now export the current request ID into MDC. #2511

      <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} %X{req.id} %msg%n</pattern> </encoder> </appender> <appender name="RCEA" class="com.linecorp.armeria.common.logback.RequestContextExportingAppender"> <appender-ref ref="CONSOLE" /> <export>req.id</export> </appender> </configuration>

    • Client-side options API (ClientOption and ClientFactoryOption) has been revamped. #2523

      • ClientOptions.get() and ClientFactoryOptions.get() never throws an exception. A default value is returned for an unspecified option. Therefore, other getter methods such as getOrElse() have been removed.

    ๐Ÿ“ˆ Improvements

    • You'll now get a ClosedStreamException instead of Http2Exception when your HTTP/2 connection was closed due to an RST_STREAM frame. #2508

    ๐Ÿ› ๏ธ Bug fixes

    • *ClientBuilder.options(ClientOptions) now overrides only the specified options. #2516

      ClientFactory factory = ClientFactory.insecure();ClientOptions options = ClientOptions.builder() .responseTimeMillis(5000) .build();WebClient client = WebClient.builder("http://foo.com") .factory(factory) .options(options) .build();// This assertion does not fail anymore.assert client.options().factory() == ClientFactory.insecure();

    • ๐Ÿ›  Fixed a bug where DocService throws the java.lang.IllegalStateException: zip file closed exception while starting up. #2518 #2519

    • MetricCollectingClient does not count the request that failed initially due to a connection refused error and then succeeded after a retry as failure anymore. #2517

    • ๐Ÿ›  Fixed a bug where LoggingClient and LoggingSerivce does not push the current context when logging. #2528

    • RequestContextExporter and RequestContextExportingAppender can now export a single custom attribute into multiple MDC properties. #2521

    • RequestContextExporter and RequestContextExportingAppender does not export outdated custom attributes anymore. #2520

    • ๐Ÿ“‡ Renamed incorrect meter ID armeria.server.pendingResponses into armeria.server.pending.responses. #2506

    • The Date header is now encoded properly even when System.nanoTime() returns a negative value. #2530

    • GrpcStatus.fromThrowable() now treats ContentTooLargeException as RESOURCE_EXHAUSTED rather than INTERNAL_ERROR. #2523

    ๐Ÿฑ โ˜ข๏ธ Breaking changes

    • ๐Ÿšš ClientOptions.getOrElse() and getOrNull() have been removed. get() always returns a non-null value now. #2523
    • ClientOptions.asMap() and ClientFactoryOptions.asMap() now return only the options overridden by a user. You can get the Set of available options using ClientOptions.allOptions() or ClientFactoryOptions.allOptions(): #2516 #2523

      ClientOptions myOptions = ...;Map<ClientOption<?>, Object> map = new IdentityHashMap<>();for (ClientOption o : ClientOptions.allOptions()) { map.put(myOptions.get(o)); }

    • ClientOptions.valueOf() and ClientFactoryOptions.valueOf() have been split into two methods: define() and of() #2523.

      • Use of() if you're getting an existing option.
      • Use define() if you're defining a new option.
    • ๐Ÿš€ You might need to adjust your monitoring system if you were watching armeria.server.pendingResponses, which has been renamed to armeria.server.pending.responses in this release. #2506

    ๐Ÿฑ โ›“ Dependencies

    • โฌ‡๏ธ Dropwizard 1.3.18 โ†’ 1.3.19
    • โฌ‡๏ธ Dropwizard Metrics 4.1.2 โ†’ 4.1.3
    • java-jwt 3.9.0 โ†’ 3.10.0
    • RxJava 2.2.17 โ†’ 2.2.18
    • Shaded dependencies
      • Reflections 0.9.12 โ†’ 0.9.11 (Downgrade)

    ๐Ÿฑ ๐Ÿ™‡ Thank you

    ๐Ÿš€ This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests: