Questions tagged [mutiny]

Mutiny is an event-driven, reactive programming library for Java 8+.

Mutiny is an event-driven reactive programming library, supporting (Reactive Streams) based back-pressure and designed after having experienced many issues with other Reactive programming libraries.

It takes a different approach by providing the most used operators with a more guided API, which avoids having classes with hundreds of methods that cause trouble for even the smartest IDE. The library has built-in converters from and to other reactive programming libraries, so you can always pivot.

Mutiny reuses ideas from Reactive eXtensions but does not follow the same API guidelines and operators. Also, it can be used to build Reactive Systems, for example, by combining, Mutiny, and Reactive Messaging.

228 questions
5
votes
2 answers

How to test pollling pattern in Mutiny on Quarkus?

I would like to test a simple polling example from https://smallrye.io/smallrye-mutiny/guides/polling and poll the data of a service into a Kafka stream. This is a simplified example of a class I want to test: @ApplicationScoped public class…
Schallabajzer
  • 121
  • 1
  • 2
  • 7
5
votes
1 answer

Uni how to get failure or success response at REST call

I'm trying to setup a simple success / failure response after a email was sent by the server. However, even after hours of trying many variants, I still doesn't get the correct response. The example code that just gives a response accepted is…
4
votes
1 answer

Is there a working Quarkus OpenTelemetry support in reactive Mutiny code?

I'm trying to introduce OpenTelemetry into our existing Quarkus-based (v 2.9.2.final) set of services. All services are written in a reactive way based on Mutiny. I'm failing to continue Spans or add events and attributes to them. I have configured…
4
votes
1 answer

How to rewrite Uni> to Multi without a list? Reactive Programming

As i am working in a Project where i want to rewrite the Uni to Multi for a method "findall" to get all the mongodb Document from a collection. I tried to rewrite but not able to find a solution original: public Uni> findAll(List
4
votes
2 answers

Quarkus Reactive - Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" Error

Using Quarkus I get the following error at execution time: Caused by: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public…
Daniel Sobrado
  • 717
  • 1
  • 9
  • 22
4
votes
1 answer

Non-blocking streaming of data between two Quarkus services (Vert.x with Mutiny in Java)

Update! I have fixed minor bugs in the sample code after solving some of the problems that were irrelevant to the main question which is still about non-blocking streaming between services. Background info: I'm porting a Spring WebFlux service under…
Péter Veres
  • 955
  • 1
  • 10
  • 25
3
votes
1 answer

Java how to Uni.createFrom().future() and return that Uni from the enclosing method?

I am very new to Java and Mutiny. As indicated below, my test function asks Redis for the value of key "foo" which is "bar". That is working and the Future onCompleted() gets "bar". So far so good. I have two issues with the…
Murrah
  • 1,508
  • 1
  • 13
  • 26
3
votes
1 answer

Right way to start a background task per request in Quarkus

I wonder what is the good practice in Quarkus to run background task per request. Something like this: @POST() @Path("v1") public Uni buildSomething() { // start a thread to build things in the background //…
GeauxEric
  • 2,814
  • 6
  • 26
  • 33
3
votes
2 answers

Can we get parallel processing of each of Multi pipeline steps?

Lets say we have: a list of URLs, that is a source for our Multi as a first step we grab HTML of this page using HTTP client call then we try to find some specific tag and grab its content then we store things we found into database Now we have a…
David Marko
  • 2,477
  • 3
  • 27
  • 58
3
votes
3 answers

How do i sort a Multi in smallrye mutiny

Other reactive libraries like project reactor offer sort methods for Publishers but there is no such method in mutiny. Their documentation doesn't even talk about it. https://smallrye.io/smallrye-mutiny Right now i'm achieving the said…
3
votes
2 answers

quarkus: IllegalStateException: You have attempted to perform a blocking operation on a IO thread. This is not allowed, as blocking the IO thread

There is one thing I have trouble understanding with quarkus. I use JPA with Oracle. So I have the error IllegalStateException: You have attempted to perform a blocking operation on an IO thread. This is not allowed, as blocking the IO thread I…
Sekaijin
  • 107
  • 1
  • 6
2
votes
1 answer

How to convert a Uni response to a "not found" in Quarkus Resteasy Reactive?

Given an endpoint like that: @GET @Path("{id}") public Uni getSomeStuff(@PathParam("id") int id) { return someService.fetchStuff(id); } When someService.fetchStuff(id) returns an Uni the endpoints returns an empty HTTP response with…
Marc
  • 1,900
  • 14
  • 22
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
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
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…
1
2 3
15 16