Questions tagged [quarkus-reactive]

132 questions
3
votes
1 answer

Is it possible to join two entities with panache?

I want to get two values from two different sql tables. In sql we would do "Select a.value, b.value from A a inner join B b on a.id = b.id where ..." Is it possible to do it with panache? Like join two entities or something like that? Can't really…
3
votes
0 answers

Quarkus Reactive throws "Session is currently connecting to database"

I'm running into a problem with Quarkus Reactive when running load tests. It seems connections aren't freed up fast enough. The endpoint basically does a database lookup by a received code, and then stores a new event with the entity as a…
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
3
votes
2 answers

Using Quarkus Cache with Reactive and Mutiny correctly

I'm trying to migrate my project to Quarkus Reactive with Hibernate Reactive Panache and I'm not sure how to deal with caching. My original method looked like this @Transactional @CacheResult(cacheName = "subject-cache") public Subject…
2
votes
0 answers

Howto use Mutiny to parse lines of a file

I learn Reactive/Mutiny. I try to use Mutiny to read lines of a file. In imperative way of doing it, it's easy : public List load(final InputStream inData) throws IOException { final List content = new ArrayList<>(); final…
Lbro
  • 309
  • 2
  • 16
2
votes
0 answers

How to update a list of values in database using Quarkus version 3.1.2 (hibernate-reactive)

I have two entities with one to many mapping. Table names: key and Value (many values mapped to one key). I have defined the cascade operation as ALL while writing the entity. I have a set of data to be updated in value table. This does not work…
2
votes
1 answer

Quarkus Mutiny multithreading

I have some imperative code which processes on 20 Threads in parallel. IntStream.range(0, 20) .forEach(t -> { Runnable runnable = () -> { int records = RANGE; while (records > 0) { records =…
2
votes
0 answers

Quarkus/Postgres "complex" relationship many to many

I am on my first Quarkus project based on quarkus-resteasy-reactive. I have managed so far to get the basic operations working but I'm stuck on recording linked information in many to many. Basically I have a : @Entity @Cacheable public class…
MrGlup
  • 21
  • 3
2
votes
2 answers

Cannot persist data with quarkus + hibernate reactive panache entity

I'm trying to create a Hello World application with quarkus. I have many troubles making it work. Here are my classes : import java.time.Duration; import io.quarkus.hibernate.reactive.panache.Panache; import…
2
votes
1 answer

How to properly chain calls to external API's using Mutiny and process the response? Java / Quarkus / Mutiny

I'm a beginner on asynchronous Java programming and I'm trying to understand how to properly use Mutiny for a Quarkus application which has a Client that sends requests to an external API. This client has two methods that return Uni. Those are the…
2
votes
2 answers

How can i reactive list entities with different params in Quarkus 3.0.0.RC2 with hibernate reactive panache library while using repository pattern?

I am working on a project using Quarkus 3.0.0.CR2 and Hibernate Reactive Panache as the ORM for a reactive application. The application retrieves animals from owners using an API resource that makes 5 reactive calls to a service, which is forwards…
2
votes
2 answers

Is there a difference between Uni> vs Multi in Quarkus Resteasy reactive?

When implementing a reactive endpoint, is there any difference between returning Uni> vs Multi ? @Path("/fruits") public class FruitResource { @GET @Path("uni") public Uni> getUni() { return…
Olivier Boissé
  • 15,834
  • 6
  • 38
  • 56
2
votes
0 answers

Hibernate Reactive : Session is closed and times out in scheduler

I'm currently working on a scheduler to change the status(Enum) in my base every 15 seconds using @ReactiveTransactional and throws "Session is closed" and then it runs my code for just one time. I tried it with just @Transactinal too (although it's…
2
votes
1 answer

Quarkus Reactive Websocket Hibernate Query RequestScoped context was not active

I'm trying to do reactive Hibernate Panache queries on a websocket message in quarkus, but unfortunately, the reactive call just fails (without errors!). I now tried to get the result directly via the .await().indefinitely() methods, and now I can…
SIMULATAN
  • 833
  • 2
  • 17
2
votes
1 answer

How to record each throwable when using .onFailure().retry() with delay between retries

I need to record failure reason in metrics for each failed http call when using Vert.x WebClient. This compiles: .onFailure() .retry() .withBackOff(Duration.ofMillis(INITIAL_RETRY_DELAY_MS)) …
Panu Haaramo
  • 2,932
  • 19
  • 41
2
votes
1 answer

Mutiny - combine Uni and Multi based on business logic

I am new to reactive programming. Kindly assist in achieving the below in Mutiny. I have a DTO class public class UserAppSessionDto{ private UserDto user; private List userOrgs; private List userApps; } and 3 service…
Alifax
  • 21
  • 1
  • 2
1
2 3
8 9