Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
APACHE-2.0 License
Bot releases are hidden (Show)
EventLoop
available to RemoteInvoker.invoke()
RemoteInvoker.invoke()
. You won't notice this at all if you did not implement RemoteInvoker
by yourself to write a decorator.ServiceInvocationContext
ServiceInvocationContext
via onEnter(Runnable)
and onExit(Runnable)
.This release introduces distributed tracing capability to Armeria clients and servers using Brave, a distributed tracing library compatible with Zipkin. This enables us to watch timing data among the whole Armeria RPC chain.
// Create a brave instance with service name, span collector, and sampling rate.
Brave brave = new Brave.Builder("MyClientMain")
.spanCollector(new ScribeSpanCollector("127.0.0.1", 9410))
.traceSampler(Sampler.create(0.01f))
.build();
MyService.Iface client =
new ClientBuilder("tbinary+http://127.0.0.1:8080/thrift/myService")
.decorator(HttpTracingClient.newDecorator(brave))
.build(MyService.Iface.class);
// Create a brave instance with service name, span collector, and sampling rate.
Brave brave = new Brave.Builder("MyServiceMain")
.spanCollector(new ScribeSpanCollector("127.0.0.1", 9410))
.traceSampler(Sampler.create(0.01f))
.build();
ServerBuilder builder = new ServerBuilder();
builder.port(8080, SessionProtocol.HTTP);
builder.serviceAt("/thrift/myservice",
ThriftService.of(new MyServiceHandler(brave))
.decorate(HttpTracingService.newDecorator(brave));
#110 Provide a way to create a TomcatService
from an existing Tomcat Connector
ServerBuilder sb = new ServerBuilder();
sb.serviceUnder("/tomcat", TomcatService.forConnector("example.com", springBootConnector));
#115 DropWizard Metrics support
MetricCollectingClient
and MetricCollectingService
to collect the metrics of your clients and services:ServerBuilder sb = new ServerBuilder();
sb.serviceAt(
"/thrift/foo", ThriftService.of(...).decorate(
MetricCollectingService.newDropwizardDecorator("fooService", metricRegistry));
ClientBuilder cb = new ClientBuilder(...);
cb.decorator(MetricCollectingClient.newDropwizardDecorator("barService", metricRegistry));
TomcatService
ClientOptions
more efficiently using Clients.newDerivedClient()
.SessionProtocolNegotiationCache
now keeps the recent HTTP/2 upgrade failures so that Armeria does not send an upgrade request to the hosts known to be incapable of HTTP/2. This should reduce the number of HEAD / HTTP/1.1
upgrade requests in your H1C connections.ClientBuilder.decorator()
for more information.Server.nextEventLoop()
so that a user can get one of the available Netty EventLoop
s.TomcatService
CachedEntry
in HttpFileService
pom.xml
ServiceInvocationContext
for propagating context into callbacksVisit the milestone page for the detailed change list.
DocService
page will add a URL hash which contains the content of the debug form to the current browser location. A user could share the URL, so that the recipient sees a pre-populated debug form.DocService
so that the DocService
can populate a better JSON template in a debug form.MetricCollectingService
as a preparatory step for implementing concrete metrics supportHttpService.orElse()
that allows combining two HttpService
into one. e.g. HttpFileService.for(...).orElse(TomcatService.for(...)
Logger
returned by ServiceInvocationContext.logger()
has changed.
armeria.services.<service_path_prefix>
by default. e.g. armeria.services.hello.thrift
for /hello/thrift
ServerBuilder.serviceLoggerNamePrefix()
and by specifying the logger name when binding a service via ServerBuilder.service()
or VirtualHostBuilder.service()
.ServiceEntry
to ServiceConfig
ServiceConfig.virtualHost()
ServiceConfig.server()
VirtualHost.server()
ServerConfig.server()
Service.serviceAdded(ServiceConfig)
ServiceCodec.decodeRequest(ServiceConfig, ...)
ServiceCodec.codecAdded(ServiceConfig)
ServiceHandler.handlerAdded(ServiceConfig)
DocService
ThriftService
now handles multiple protocols based on the protocol
parameter of Content-Type
header.
application/x-thrift; protocol=tcompact
ThriftService
is now instantiated via its factory methods instead of its constructors.ServiceInvocationContext.current()
does not return an Optional
anymore.
mapCurrent()
if you do not want an exception.The operations exposed by the documentation service now have 'endpoints' and 'debug' section.
endpoints
section lists the paths and the accepted content types of the operation.debug
section allows you to invoke the service via Thrift TEXT protocol easily.