Questions tagged [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.

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.

If you have a question about using Armeria in your Java application, this is the tag you should use.

Useful Links

33 questions
3
votes
1 answer

How to Setup Armeria With Bazel?

I'm new to Bazel and Armeria. In the Armeria dev guide, in setting up with a build system, it has examples from Gradle and Maven, but not Bazel. Downloading the jar file (armeria-1.18.0.jar) and importing it directly using java_import() will build…
kash-hash
  • 33
  • 2
2
votes
1 answer

Is there any way to use rich error model for grpc service in armeria?

I am using Armeria 1.3.0 and protobuf for a gRPC service. I've tried to use rich error model when handling exceptions but I think Armeria seems to only support standard error model. How can I use rich error model in Armeria? I want to return custom…
chacha
  • 23
  • 3
2
votes
2 answers

Retrieve the Jetty instance in Dropwizard 2.0.0

We have a project made in Dropwizard version 2.0.0-RC, where we use REST-endpoints. After some issues we decided to use gRPC instead of using REST. There is a couple of 3rd party libraries to connect gRPC to Dropwizard, but we believe they are a bit…
Sebastian Berglönn
  • 3,920
  • 2
  • 17
  • 33
2
votes
0 answers

Proxying large files using armeria or asynchttpclient

I have a proxy server made with Armeria which should start a download from a source and simultaneously stream it outwards to a destination. The file should be streaming as this is a proxy server and I don't want to make it store and forward. This…
Joeav
  • 91
  • 5
1
vote
0 answers

Armeria API to close HTTP connection from server-side

We use Armeria as a mock HTTP server to test negative scenarios like delayed responses and unexpected error status codes etc. Now we have a requirement where we need to close a connection so that we can test what the client does in connection reset…
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
1
vote
2 answers

gRPC ServerInterceptor with Armeria

I am using Armeria with gRPC/java and I'm looking to decorate one of the services with an AuthService like this https://sultanov.dev/blog/securing-java-grpc-services-with-jwt-based-authentication/. I want to access the gRPC request header, do some…
Chan Rao
  • 33
  • 3
1
vote
1 answer

Handle Content-Encoding gzip in Annotated Service

I have an annotated service. Some clients POST requests with the content in plaintext. Other clients POST requests gzipped and include the header Content-Encoding: gzip. The gzipped requests are failing to be decoded as proto values, because they…
Synesso
  • 37,610
  • 35
  • 136
  • 207
1
vote
1 answer

How to leverage Armeria's fantastic JSON to GRPC transcoding functions to springboot project

We have a existing springboot project which has terrible API management system. So we wanna do something like grpc-gateway related work. But we don't want to add sidecar to our existing service. We found that Armeria has a wonderful json grpc…
Hu Guang
  • 61
  • 7
1
vote
1 answer

Unit testing Armeria's decorator using context.log().whenComplete()

I have a subclass of SimpleDecoratingHttpService that contains something like this: override fun serve(ctx: ServiceRequestContext, req: HttpRequest): HttpResponse { ctx.log().whenComplete().thenAccept { if (it.responseCause()…
Max
  • 4,882
  • 2
  • 29
  • 43
1
vote
1 answer

disallowing a particular http method

Related to https://github.com/openzipkin/zipkin/pull/3239 , we came across some (maybe) odd behaviour and i wanted to know if below test works as expected or not: import com.linecorp.armeria.client.WebClient; import…
1
vote
1 answer

How to get headers in httpservice with thrift protocol

HelloWorldService.Iface helloService = Clients.builder("tbinary+http://127.0.0.1:8080/hello") .addHttpHeader("key", "value") .build(HelloWorldService.Iface.class); ServerBuilder sb =…
twogoods
  • 1,646
  • 2
  • 14
  • 21
1
vote
1 answer

How to make Armeria exit on an `Address already in use` error?

How do I make sure that my program exits when Armeria fails to start because of an Address already in use error? I have the following code: import com.linecorp.armeria.common.HttpRequest; import com.linecorp.armeria.common.HttpResponse; import…
0
votes
0 answers

BraveService decorator fails to propagate context on gRPC service in Armeria

I am serving a gRPC service with Armeria, Spring Boot 3, and WebFlux. I want to use Brave to print traceId and spanId to the log. I used the following guide…
mys
  • 119
  • 1
  • 12
0
votes
0 answers

Armeria - Request is waiting for ForkJoinPool.commonPool-worker

Request is not being served and getting timed out. Observation is request is reaching to worker thread - 16:19:23.051 [armeria-common-worker-nio-2-2] DEBUG c.l.a.server.logging.LoggingService . But it is not reaching to Fork join thread…
Nitul
  • 997
  • 12
  • 35
0
votes
1 answer

How to include `:` in an http path in an Armeria Server?

I want to create an endpoint similar to this: POST /someresource:validate Based on Google API Guideliness for custom methods. But when I add it I get this error: Exception in thread "main" java.lang.IllegalArgumentException: pathPattern:…
Aiono
  • 389
  • 2
  • 10
1
2 3