Stay up to date on releases
Create your free account today to subscribe to this repository for notifications about new releases, and build software alongside 40 million developers on GitHub.
Sign up for free See pricing for teams and enterprises
trustin
released this
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.
New features
- You can now jump to a service method quickly using a go-to form in a
DocServicedebug page. #1815

- From this release, TLSv1.3 is enabled by default. #1779
RoutereplacesPathMapping. #1789ServerBuilder sb = new ServerBuilder(); sb.service(Route.builder() .path("/greet/{name}") .consumes(MediaType.JSON) .produces(MediaType.JSON_UTF_8) .build(), (ctx, req) -> HttpResponse.of(HttpStatus.OK, MediaType.JSON_UTF_8, ...));
AggregatedHttpMessagehas been split into two subtypes:AggregatedHttpRequestandAggregatedHttpResponse. #1702 #1795- The factory methods and some getter methods in
AggregatedHttpMessagehave been pushed down to the two subtypes. For example,AggregatedHttpMessage.method()does not exist anymore and you will find it inAggregatedHttpRequest. - We have revised the API to use
AggregatedHttpRequestorAggregatedHttpResponserather thanAggregatedHttpMessagewherever possible for clarity.
- The factory methods and some getter methods in
- New static factory methods have been added to
HttpData. #1797HttpData.of()was not very clear about whether it will wrap the specified bytes or make a copy of them.HttpData.wrap()andHttpData.copyOf()removes such ambiguity.byte[] b = new byte[] { 1, 2, 3 } HttpData copied = HttpData.copyOf(b); HttpData wrapped = HttpData.wrap(b); b[0] = 0; assert copied.array()[0] == 1; assert wrapped.array()[0] == 0;
- You can now specify
SubscriptionOptions when subscribing to aStreamMessageto modify the contract betweenStreamMessageandSubscriber. #1700 #1808HttpRequest req = ...; // Subscriber.onError() will be invoked with a CancelledSubscriptionException // when the Subscription is cancelled. req.subscribe(mySubscriber, SubscriptionOption.NOTIFY_CANCELLATION);
- The
Endpoints loaded from a.propertiesfile byPropertiesEndpointGroupare now automatically updated when the.propertiesfile is modified. Note that the classpath resources are not auto-reloaded and you have to specify a real file as ajava.nio.Path. #1787PropertiesEndpointGroup endpoints = PropertiesEndpointGroup.of( Paths.get("/etc/my/endpoints.properties"), "endpoints.");
- You can now create a
Clientby specifying anEndpointrather than aURI. #1743Endpoint endpoint = Endpoint.of("example.com"); HttpClient client = new HttpClientBuilder(SessionProtocol.HTTPS, endpoint) ... .build();
- You can now apply Armeria's default settings to an existing
DropwizardMeterRegistry(orPrometheusMeterRegistry) usingDropwizardMeterRegistries.configureRegistry()(orPrometheusMeterRegistries.configureRegistry()). Previously, Armeria's default settings were applied only to theMeterRegistrys created byDropwizardMeterRegistries.newRegistry()(orPrometheusMeterRegistries.newRegistry()). #1814 #1820import io.micrometer.jmx.JmxMeterRegistry; // JmxMeterRegistry is a subtype of DropwizardMeterRegistry. JmxMeterRegistry jmxRegistry = new JmxMeterRegistry(...); DropwizardMeterRegistries.configureRegistry(jmxRegistry);
- A new exception type
InvalidSamlRequestExceptionhas been added so that you can tell if a client sent an invalid SAML request from exception type. #1780 #1783
Improvements
- Consolidated the logic related with TLS and improved TLS configuration validation. #1779
- Stack trace is logged for better debuggability when
RequestContextCurrentTraceContextcannot find the currentRequestContext. #1800
Bug fixes
- The percent-encoding of the characters such as
#and/are now preserved correctly. #1805 - gRPC
Metadatais now supported. #1788 #1790 - Fixed a bug where a bad gRPC client is created when a user specified a URL that does not end with a slash (
/). #1785 - The trailers added with
ServiceRequestContext.addAdditionalResponseTrailer()are not ignored anymore. #1782 - JUnit 5 extensions are now initialized and destroyed on
BeforeAllandAfterAllrather than onEach. #1801 spring-boot-webflux-starterdoes not fail to start anymore even if more than oneMeterRegistryexist. #1791
Deprecations
HttpData.offset()has been deprecated. It always returns0. #1771 #1797- Some
HttpData.of()methods have been deprecated in favor ofHttpData.wrap()and/orHttpData.copyOf(). #1797 trailingHeaders()methods inAggregatedHttpMessageandHttpResulthave been deprecated in favor oftrailers(). #1795StreamMessagemethods which acceptboolean withPooledObjectshave been deprecated. Use the methods that acceptSubscriptionOptionand specifySubscriptionOption.WITH_POOLED_OBJECTS. #1700
Breaking changes
AggregatedHttpMessagehas been split into two subtypes. See 'New features' for more information. #1702 #1795PathMappingand its related classes have been replaced withRouteand its related classes. See 'New features' for more information. #1789ServiceWithPathMappingshas been replaced withServiceWithRoutes.
ClientCacheControlandServerCacheControlhave been moved to thecom.linecorp.armeria.commonpackage. #1813 #1816
Dependencies
- Bouncy Castle 1.61 -> 1.62
- gRPC 1.20.0 -> 1.21.0
- Guava 27.1 -> 28.0
- java-jwt 3.8.0 -> 3.8.1
- Project Reactor 3.2.9 -> 3.2.10
- protobuf-jackson 0.3.1 -> 0.4.0
- Retrofit 2.5.0 -> 2.6.0
- RxJava 2.2.8 -> 2.2.9
- Tomcat 9.0.20 -> 9.0.21, 8.5.40 -> 8.5.42
- ZooKeeper 3.4.14 -> 3.5.5
Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests: