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
0
votes
1 answer

Can't create ArmeriaCatsBackend in IOApp with Cats effects?

I want to use ArmeriaCatsBackend as sttp backend with Cats effects. The following code does not compile: object Main extends IOApp { val backend = ArmeriaCatsBackend[IO]() // ... } could not find implicit value for evidence parameter of type…
igr
  • 10,199
  • 13
  • 65
  • 111
0
votes
1 answer

How to Access Request Body in Armeria Client Decorator

I need to intercept and sign my client requests in Armeria using AWS v4 signature. That signing procedure needs access to the body of the request, but it seems like I can't access request body in the client decorator. Something…
kash-hash
  • 33
  • 2
0
votes
2 answers

How can I log every request/response body in Armeria HTTP client

I tried two approaches to log every HTTP body produced/received by my armeria client: using out-of-box LoggingClient decorator decorator(LoggingClient.newDecorator()) creating custom logging decorator decorator { delegate, ctx, req -> …
Andrey
  • 63
  • 2
  • 9
0
votes
0 answers

Armeria Thread Leak

We are using armeria at work. We recently launched a new service into production and are finding that there is a thread leak somewhere. I am trying to identify the source. It looks like every time we make a call to any grpc endpoint new threads are…
sethu
  • 8,181
  • 7
  • 39
  • 65
0
votes
1 answer

How to run zipkin on another ip address than localhost when starting server with "java -jar zipkin.jar"

Did saw this... But I'm not able to make it run, whatever I have tried, I get either still on localhost, either an exception on armeria bind ( I have stuff running on :8080) and server crash... In short what I have tried (Windows Server 2016, so no…
MrSmersh
  • 1
  • 2
0
votes
1 answer

How to use RequestContext custom attributes of armeria in log4j2.xml configuration?

I'm using log4j2 2.14.0 with armeria 1.3.0. According to the armeria documentation, I could see RequestContext custom atrributes can be exported using com.linecorp.armeria.common.logback.RequestContextExportingAppender in logback configuration. So,…
chacha
  • 23
  • 3
0
votes
1 answer

HTTP to HTTPS proxy CONNECT handling - porting code from Netty to Armeria

I have some code that currently works in Netty, which acts as an HTTPS proxy server, so we handle a CONNECT method and add an SSL handler to the pipeline on the fly: // SimpleChannelInboundHandler @Override protected void…
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
0
votes
1 answer

Armeria grpc client: how can I set different retry behavior for different grpc methods

I am using Armeria grpc client as follows: Clients.builder("gproto+http://....") .decorator(RetryingClient.newDecorator(retryRule, maxAttempts, perAttemptTimeout)) This enforces this retry behavior across all outgoing requests. Is there a way to…
0
votes
1 answer

Accessing response headers using a decorator in Armeria

I would like to add a decorator to my armeria client that checks each http response if a certain http header was returned: builder.decorator((delegate, ctx, req) -> { final HttpResponse response = delegate.execute(ctx, req); final…
0
votes
3 answers

how to propagate the ServiceRequestContext to my customized thread pool

I have a scenario, which process armeria request, and dispatch some event to guava's EventBus. the problem is I loss the context while process the event in the EventBus handler. I want to know is there any way to let the event processor access…
Eone
  • 1
  • 2
0
votes
1 answer

Armeria HTTP Client - how to add query string parameters

I searched for a bit but couldn't find an "Armeria API" to do this elegantly. I'm familiar with Netty so for the time being I'm using QueryStringEncoder. Is there a better way to do this ? Here I have a dynamic Map of params and I need to build the…
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
0
votes
1 answer

Using third party http client on Armeria

I'm discovering Armeria framework and I want to consume a REST service. Using the Armeria WebClient: WebClient webClient = WebClient.of("http://localhost:9090"); RequestHeaders getJson = RequestHeaders.of(HttpMethod.GET, "/some-service", …
0
votes
1 answer

Armeria WebClient request with connection factory and Req header

I have been trying to make an https connection using armeria WebClient Since the connection factory is not specified I am getting javax.net.ssl.SSLHandshakeException could anyone help with a relevant example.? Thanks
Sreyas
  • 744
  • 1
  • 7
  • 25
0
votes
1 answer

Understanding Decorators in Armeria

I am just starting out with Armeria and struggling to fully understand some things. I implemented DecoratingHttpServiceFunction in order to supply requests to a service with a Hibernate session. @Override public HttpResponse serve(HttpService…
Robert Engel
  • 664
  • 6
  • 13
0
votes
1 answer

Bootstrap Hibernate SessionFactory in Netty/Armeria handler method fails with ClassNotFoundException

I have a Java Application that uses Armeria for a Web Service. When I create my Hibernate SessionFactory in the main method it works fine. But I am trying to create the SessionFactory when a certain Http Endpoint is called. In the handler method the…
Robert Engel
  • 664
  • 6
  • 13