You're seeing the release note of an old version. Check out the latest release note.
v1.21.0
December 22, 2022
🌟 New features
-
You can now use
@RequestTimeoutto set a request timeout to annotated services and gRPC services. #4463 #4499import com.linecorp.armeria.server.annotation.decorator.RequestTimeout;
@RequestTimeout(value = 1, unit = TimeUnit.SECONDS) // 👈👈👈
class MyAnnotationService {
// A request gets timed out after 1 second.
@Get("/fast/api")
public CompletableFuture<MyResponse> fastApi() {
...
}
// A request gets timed out after 5 seconds.
@RequestTimeout(value = 5, unit = TimeUnit.SECONDS) // 👈👈👈
public CompletableFuture<MyResponse> slowApi() {
...
}
} -
You can now set the default
MeterRegistryby implementing a customFlagsProvider. #4541public class CustomFlagsProvider implements FlagsProvider {
@Override
public MeterRegistry meterRegistry() {
return PrometheusMeterRegistries.newRegistry(); // 👈👈👈
}
} -
You can now set the default
HttpHeaderstoServer,VirtualHostandService. #4520static AsciiString CUSTOM_HEADER =
HttpHeaderNames.of("x-custom-header");
Server
.builder()
.setHeader(CUSTOM_HEADER, "server-default-header")
.virtualHost("foo.com")
.setHeader(CUSTOM_HEADER, "vhost-default-header").and()
.route()
.path("/foo")
.setHeader(CUSTOM_HEADER, "service-default-header") -
You can now set
:authorityorHostheader whose value is different fromEndpoint.host()usingClientBuilder.setHeader(). #4440 #4520- This will be useful when you want to send a request through a proxy server.
WebClient
// A request is sent to 'reverse-proxy.example.com'.
.builder("http://reverse-proxy.example.com/")
// but 'my-order.service.com' is used for the ':authority' header.
.setHeader(HeaderNames.AUTHORITY, "my-order.service.com")
... -
CircuitBreakerClientcan now be used with arbitraryCircuitBreakerimplementations. #4426 -
You can now see the description of services in the overview section of
DocService. #4480 #4537 -
You can now override an authority of a gRPC client using
CallOptions. #4445 #4520
📈 Improvements
DecodingClientandDecodingServicecan now limit the maximum length of decompressed data. #4469 #4564synchronizedblocks have been replaced withReentrantLockfor better virtual thread compatibility. #4551 #4549ServiceSpecificationforDocServiceis lazily loaded so as to not block aServerfrom starting. #4491
🛠️ Bug fixes
HttpHeadersset byClientBuilder.setHeader()is now stored inClientRequestContext.defaultRequestHeaders()which has the lowest priority and doesn't override values inRequestHeaders.- Previously, the
HttpHeadersset viaClientBuilderwere stored inClientRequestContext.additionalRequestHeaders()which overrode the values inRequestHeaders#4440 #4520
- Previously, the
- Fixed a regression where
voidmethods return200 OKinstead of204 NoContentif a@Producesannotation is added. #4575 - Deleted uncompressed
DocServiceassets that were added unintentionally. #4500 #4568 - An exception raised in
Authorizeris now properly peeled usingExceptions.peel(). #4567 - Exceptions raised in decorators can now be used to determine whether to retry by
RetryingClient. #4558 #4559 EndpointGroupis now correctly copied to a newly derived client. #4556RequestContextExportingAppendercan now be used with logbackSocketAppender. #4546 #4547- Reversed HTTP/1.1 responses are now correctly ordered when HTTP/1.1 pipelining is enabled. #4536 #4470
414 Request-URI Too Longis now correctly returned for a long URI in HTTP/1.1. #4478 #4532- Fixed to propagate the cause of a decoder failure of an HTTP/1.1 request to
ServerErrorHandler.onProtocolViolation()#4478 #4532 - You can use
DocServiceeven whenServer.reconfigure()is called. #4491 #4513 - Context leak stack trace is more readable now. #4517
🏚️ Deprecations
- N/A
☢️ Breaking changes
FieldInfo.childFieldInfohas been removed to eliminate duplicate information onStructInfo. #4566
⛓ Dependencies
- Apache Curator 5.3.0 → 5.4.0
- Brave 5.14.0 → 5.14.1
- Dropwizard 2.1.1 → 2.1.4
- Eureka 1.10.17 → 2.0.0
- GraphQL Java 19.2 → 20.0
- Jackson 2.13.4 → 2.14.1
- java-jwt 4.0.0 → 4.2.1
- Jetty 9.4.48 → 9.4.50
- Kafka client 3.3.0 → 3.3.1
- Kotlin 1.7.20 → 1.7.22
- Micrometer 1.9.4 → 1.10.2
- Netty 4.1.82 → 4.1.86
- io_uring 0.0.15 → 0.0.16
- Reactor 3.4.23 → 3.4.26
- Sangria 3.3.0 → 3.4.1
- Sangria slowlog 2.0.4 → 2.0.5
- Scala 2.13.9 → 2.13.10
- scala-collection-compat 2.8.1 → 2.9.0
- ScalaPB 0.11.11 → 0.11.12
- Tomcat 8.5.81 → 8.5.84, 9.0.65 → 9.0.70
- ZooKeeper 3.6.3 → 3.7.1
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:












