armeria-0.98.3
💮 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
RequestContextExporterandRequestContextExportingAppenderfor 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 (
ClientOptionandClientFactoryOption) has been revamped. #2523ClientOptions.get()andClientFactoryOptions.get()never throw an exception. A default value is returned for an unspecified option. Therefore, other getter methods such asgetOrElse()have been removed.
📈 Improvements
- You'll now get a
ClosedStreamExceptioninstead ofHttp2Exceptionwhen your HTTP/2 connection was closed due to anRST_STREAMframe. #2508
🛠️ Bug fixes
*ClientBuilder.options(ClientOptions)now overrides only the specified options. #2516ClientFactory 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
DocServicethrows thejava.lang.IllegalStateException: zip file closedexception while starting up. #2518 #2519 MetricCollectingClientdoes not count the request that failed initially due to aconnection refusederror and then succeeded after a retry as failure anymore. #2517- Fixed a bug where
LoggingClientandLoggingSerivcedoes not push the current context when logging. #2528 RequestContextExporterandRequestContextExportingAppendercan now export a single custom attribute into multiple MDC properties. #2521RequestContextExporterandRequestContextExportingAppenderdoes not export outdated custom attributes anymore. #2520- Renamed incorrect meter ID
armeria.server.pendingResponsesintoarmeria.server.pending.responses. #2506 - The
Dateheader is now encoded properly even whenSystem.nanoTime()returns a negative value. #2530 GrpcStatus.fromThrowable()now treatsContentTooLargeExceptionasRESOURCE_EXHAUSTEDrather thanINTERNAL_ERROR. #2523
☢️ Breaking changes
ClientOptions.getOrElse()andgetOrNull()have been removed.get()always returns a non-null value now. #2523ClientOptions.asMap()andClientFactoryOptions.asMap()now return only the options overridden by a user. You can get theSetof available options usingClientOptions.allOptions()orClientFactoryOptions.allOptions(): #2516 #2523ClientOptions myOptions = ...; Map<ClientOption<?>, Object> map = new IdentityHashMap<>(); for (ClientOption o : ClientOptions.allOptions()) { map.put(myOptions.get(o)); }
ClientOptions.valueOf()andClientFactoryOptions.valueOf()have been split into two methods:define()andof()#2523.- Use
of()if you're getting an existing option. - Use
define()if you're defining a new option.
- Use
- You might need to adjust your monitoring system if you were watching
armeria.server.pendingResponses, which has been renamed toarmeria.server.pending.responsesin 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: