Search code examples
quarkusquarkus-panachemutiny

Quarkus Mutiny + RESTEasy Reactive: What is actually transferred when returning a stream?


I am using Quarkus + Mutiny + RESTEasy Reactive + ReactivePanacheMongoEntity.

When calling my Reactive REST Api:

@GET
public Multi<Product> streamAllProducts(){
    return Product.streamAll();
}

... all I am getting as a result is

[
    Product<635917 edf0be2d3af200c0b9>,
    Product<635917 f3f0be2d3af200c0ba>,
    Product<635917 f3f0be2d3af200c0bb>
]

I was expecting the whole objects, like this

[
   {
     id: edf0be2d3af200c0b9
     name: Product 1
   },
   {
     id: f3f0be2d3af200c0ba
     name: Product 2
   },
   {
     id: f3f0be2d3af200c0bb
     name: Product 3
   }
]

When using the traditional (blocking) RESTEasy, I would get the whole detailed objects. So what is actually being transferred when using RESTEasy Reactive, and how do I use the results?


Solution

  • The problem is that quarkus-resteasy-reactive-jackson is not being used, therefore proper JSON integration is not present in the REST stack.