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
andRequestContextExportingAppender
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
andClientFactoryOption
) has been revamped. #2523ClientOptions.get()
andClientFactoryOptions.get()
never throws 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
ClosedStreamException
instead ofHttp2Exception
when your HTTP/2 connection was closed due to anRST_STREAM
frame. #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
DocService
throws thejava.lang.IllegalStateException: zip file closed
exception while starting up. #2518 #2519MetricCollectingClient
does not count the request that failed initially due to aconnection refused
error and then succeeded after a retry as failure anymore. #2517๐ Fixed a bug where
LoggingClient
andLoggingSerivce
does not push the current context when logging. #2528RequestContextExporter
andRequestContextExportingAppender
can now export a single custom attribute into multiple MDC properties. #2521RequestContextExporter
andRequestContextExportingAppender
does not export outdated custom attributes anymore. #2520๐ Renamed incorrect meter ID
armeria.server.pendingResponses
intoarmeria.server.pending.responses
. #2506The
Date
header is now encoded properly even whenSystem.nanoTime()
returns a negative value. #2530GrpcStatus.fromThrowable()
now treatsContentTooLargeException
asRESOURCE_EXHAUSTED
rather thanINTERNAL_ERROR
. #2523
๐ฑ โข๏ธ Breaking changes
- ๐
ClientOptions.getOrElse()
andgetOrNull()
have been removed.get()
always returns a non-null value now. #2523 ClientOptions.asMap()
andClientFactoryOptions.asMap()
now return only the options overridden by a user. You can get theSet
of 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.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: