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
Tag: vert.x
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
Vertx JDBCCLient insert BLOB into database
I used vertx 3.9.12 and JDBCCLient. How to insert image to BLOB column? Thank in advance Answer Unwrap the io.vertx.ext.sql.SQLConnection to java.sql.Connection and then create a Blob that you add to the params:
Change Isolation level of a transaction in Reactive Postgres Client (Quarkus)
I want to execute some dql/dml queries in a transaction with the isolation level READ_UNCOMMITED. I’m using the reactive postgres client with mutiny with the suggested method withTransaction() from the Quarkus docs, but I couldn’t find any way to change the isolation lvl. Is that possible, and if yes how can I achieve this ? Thx ! Answer You can
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
Why is Vert.x worker verticle called from multiple threads concurrently?
my vertx (4.0.2) application written in Java (11) uses some data-heavy verticles that cause latency spikes because the eventloop gets blocked by them for a moment. For this reason i wanted to deploy …
Java common JDBC SQL Query strategy for Unit Test using HSQLDB and runtime using MySQL
I am developing Java Vert.x 3 application. I use HSQLDB for testing with in-memory DB and MySQL 8.0.20 for runtime. When the vertx verticle is deployed, it initializes the db and tables. Since this is …
Refresh access_token via refresh_token in Keycloak
I need to make the user keep login in the system if the user’s access_token get expired and user want to keep login. How can I get newly updated access_token with the use of refresh_token on Keycloak? I am using vertx-auth for the auth implementation with Keycloak on vert.x. Is it possible to refresh access_token with vertx-auth or Keycloak’s REST