You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/13 15:07:35 UTC
[GitHub] [camel-quarkus] linktech1 opened a new issue, #4177: No converter for Uni types
linktech1 opened a new issue, #4177:
URL: https://github.com/apache/camel-quarkus/issues/4177
When returning a Uni<Response> an error is thrown: org.apache.camel.NoTypeConversionAvailableException:
No type converter available to convert from type: io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni to the required type: java.io.InputStream
Rest service EPs that fail
@Override
public void configure() throws Exception {
rest("/api")
.get("/movie/{index}")
.to("direct:multicast");
}
OR
@Override
public void configure() throws Exception {
from("platform-http:/platform/movie/{index}")
.to("direct:multicast");
}
The multicast route calls 3 routes that each call Resteasy Reactive clients that each return exchange with a Uni<Response> in the body. I use a GroupedExchangeAggregationStrategy to gather all the responses and then combine the Unis.
Agregation Processor
private void processAllExchanges(Exchange exchange,
MyResponse myResponse) {
List<Exchange> aListOfExchanges = getExchanges(exchange);
Uni<Response> movie = getUniFromExchange(aListOfExchanges, 0);
Uni<Response> episodes = getUniFromExchange(aListOfExchanges, 1);
Uni<Response> people = getUniFromExchange(aListOfExchanges, 2);
Uni<Response> combinedUni = Uni.combine()
.all()
.unis(movie, people, episodes)
.asTuple()
.onItem()
.transformToUni(tuple -> buildMyResponse(tuple, myResponse));
exchange.getMessage().setBody(combinedUni);
}
Is Camel Quarkus going to support returning reactive types as Resteasy Reactive does?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] lburgazzoli commented on issue #4177: No converter for Uni types
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #4177:
URL: https://github.com/apache/camel-quarkus/issues/4177#issuecomment-1285050132
> What I am really looking for is Camel DSL support for the Quarkus reactive components (Reasteasy Reactive JAX-RS, Resteasy Reactive client, reactive SQL clients, reactive nosql database, etc) that enable our teams to create fully noblocking services that can be run on the vertx event loop without creating extra unneeded threads.
For that to happen, we need a new set of camel component based on the mentioned technologies, so far we have a few vertx modules supported but not all, are you interested in contributing some ?
About the vertx event loop, there is [support](https://github.com/apache/camel/blob/main/components/camel-reactive-executor-vertx/src/main/docs/reactive-executor-vertx.adoc) to enable camel reactive engine to run on it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] linktech1 commented on issue #4177: No converter for Uni types
Posted by GitBox <gi...@apache.org>.
linktech1 commented on issue #4177:
URL: https://github.com/apache/camel-quarkus/issues/4177#issuecomment-1284159982
What I am really looking for is Camel DSL support for the Quarkus reactive components (Reasteasy Reactive JAX-RS, Resteasy Reactive client, reactive SQL clients, reactive nosql database, etc) that enable our teams to create fully noblocking services that can be run on the vertx event loop without creating extra unneeded threads.
Our goal is to enable our development community easily move between developing Quarkus/MicroProfile and Camel Quarkus reactive services.
Currently I have to use the above Quarkus components directly creating a mixed programming model. Below I have to use Quarkus Resteasy Reactive controller to provide the REST API then call the Camel route via a producerTemplate instead of being able to use Camel DSL
@ApplicationScoped
@Path("/movie/{index}")
public class ResteasyReactive {
private static final Logger LOG = LoggerFactory.getLogger(ResteasyReactive.class);
@Inject
ProducerTemplate producerTemplate;
@GET
@Produces(MediaType.APPLICATION_JSON)
@Fallback(ResourceFallbackHandler.class)
public Uni<Response> movie(@RestPath String index)
{
LOG.info("Calling movie");
Uni<Response> uniResponse = producerTemplate.requestBodyAndHeader(
"direct:multicast", null, "index", index, Uni.class);
LOG.info("Movie Response: " + uniResponse);
return uniResponse;
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] ppalaga commented on issue #4177: No converter for Uni types
Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #4177:
URL: https://github.com/apache/camel-quarkus/issues/4177#issuecomment-1282157533
Hi @linktech1 I think you are the first one to ask about Mutiny on Camel. I guess the only currently possible way is to combine [Camel Reactive Streams Component](https://camel.apache.org/components/3.18.x/reactive-streams-component.html) via (`camel-quarkus-reactive-streams`) with [Mutiny converters](https://smallrye.io/smallrye-mutiny/1.6.0/guides/converters/).
It would be great to hear whether it works for you.
@lburgazzoli might have other suggestions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] linktech1 commented on issue #4177: No converter for Uni types
Posted by GitBox <gi...@apache.org>.
linktech1 commented on issue #4177:
URL: https://github.com/apache/camel-quarkus/issues/4177#issuecomment-1284061529
Are there any plans on providing ResteasyReactive component (producer & consumer) in the near future that support reactive return types? We are moving from Spring Camel based services to use Quarkus and Camel Quarkus services. We want to have these services be fully reactive were supported. Camel does not yet fully support the Quarkus reactive patterns on Camel consumers and producers that we are looking for that would aid in our migration to Camel Quarkus.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] lburgazzoli commented on issue #4177: No converter for Uni types
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #4177:
URL: https://github.com/apache/camel-quarkus/issues/4177#issuecomment-1284073174
---
Luca Burgazzoli
On Wed, Oct 19, 2022 at 3:58 PM Keith Link ***@***.***> wrote:
> Are there any plans on providing ResteasyReactive component (producer &
> consumer) in the near future that support reactive return types? We are
> moving from Spring Camel based services to use Quarkus and Camel Quarkus
> services. We want to have these services be fully reactive were supported.
> Camel does not yet fully support the Quarkus reactive patterns on Camel
> consumers and producers that we are looking for that would aid in our
> migration to Camel Quarkus.
>
I'm not sure what you mean exactly but as Peter said, as today you would
need to leverage Camel Reactive Streams Component
<https://camel.apache.org/components/3.18.x/reactive-streams-component.html>
for a reactive bridge between camel and other components.
A camel-mutiny
<https://issues.apache.org/jira/browse/CAMEL-14381?jql=project%20%3D%20CAMEL%20AND%20description%20~%20mutiny>
component has been proposed quite some time ago but so far there's no ETA
for an implementation.
Contribution are very welcome :)
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/camel-quarkus/issues/4177#issuecomment-1284061529>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAOIJBL4CFNEQODWQ4N6UTTWD747FANCNFSM6AAAAAAREMFBKU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org