Skip to content
Advertisement

Tag: vert.x

How to add a Servlet filter in Vert.x REST API?

I have a REST API which was created purely using Vert.x, I would like to instrument it for AWS X-RAY and in order to do that I need to add a servlet filter. I’m creating a webserver like this: In the documentation for AWS X-RAY they’ve only mentioned Tomcat (https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-java-filters.html). Would adding filters using web.xml work for this as well

quarkus @ObservesAsync invoke Uni

What’s the best way to invoke Uni in an async observer? It would be great if I could just return Uni but unfortunately that doesn’t work. Answer As mentioned by @ladicek, you can: use a synchronous observer and block until termination use a synchronous observer and “trigger” the async operation using a fire-and-forget approach use an async observer (while it’s

Quarkus exception Loading KafkaConsumerRebalanceListener

Having this Listener KafkaConsumerRebalanceListener class When I add into my application.properties file And adding this dependency into another class I’m having this exception when I run the service Any idea what’s wrong? Regards Answer You have to use same @Identifier(“responses”) near your injection point. It’s because @Identifier have @Qualifier over it.

Connection Reset for Vert.x mailsender on keep alive timeout

We have an application based on Quarkus (2.4.2), and its mailsender is Vert.x Mailer. Config used: The issue we are having is that 60 seconds after a mail is sent the following is logged: Based on this stacktrace it looks like it is smtp.office365.com that do Connection reset, timeout handling in Vert.x’ SMTPConnection should close gracefully. Does anyone have any

HttpServer Request get date range from query string

I am new to Java and Vertx and I have a query string with the following format: Here I have this date_1 parameter which is within a certain range. I have been using HttpServerRequest class to extract simple parameters like integers but not sure how to proceed with these kind of range parameters. With the simple parameters, I can do

Making a static final Json object in Java

I am currently building a Java Vertx application that executes a task periodically. This application is executes a certain logic and is supposed to return a value in a Json format. The logic seems to work and I don’t have a problem getting the desired value in the log, but I have trouble returning that value. And the code for

Method to get and post Json object in Vertx

I’m new to Java and to backend development, and I really could use some help. I am currently using Vert.x to develop a server that takes in a Json request that tells this server which file to analyze, and the server analyzes the file and gives a response in a Json format. I have created an ImageRecognition class where there

Batch insert entities to DB (Quarkus, Hibernate)

First off: I’m not used to Quarkus or Hibernate (I’m pretty much all .net) Problem: My service receives a list of ~10k (Would guess thats the most common number). This comes via a resource endpoint, and it takes +10s for it to complete, Far to long. And the service is unresponsive. The statusDao.Create() is annotated with @Transactional: DAO is @ApplicationScoped

Advertisement