You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (Jira)" <ji...@apache.org> on 2020/01/10 11:05:00 UTC

[jira] [Updated] (CAMEL-14381) create a camel-mutiny component

     [ https://issues.apache.org/jira/browse/CAMEL-14381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luca Burgazzoli updated CAMEL-14381:
------------------------------------
    Description: 
We should create a mutiny component, similar to camel-reactive-streams 
https://github.com/smallrye/smallrye-mutiny

{code:java}
CamelMutiny.on(context)
    .toMulti(servicenow().table("incident").max(100))
    .then(m -> doSomething(m))
    .await().indefinitely();
{code}

In Quarkus, we can nicely integrate camel into reactive messaging, like:

{code:java}
@Inject
CamelMutiny mutiny;

@Outgoing
Multi<Whatever> fromEndpoint() {
    return mutiny.toMulti(servicenow().table("incident").max(100));
}
@Outgoing
Multi<Whatever> fromEndpointURI() {
    return mutiny.toMulti("servicenow:table=incident");
}

@Incoming
void toEndpoint(Multi<Item> items) {
    return mutiny.subscribeTo(items)
        .with(servicenow().table("incident").max(100).async());
}
@Incoming
void toEndpointURI(Multi<Item> items) {
    return mutiny.subscribeTo(items)
        .with(s"servicenow:table=incident");
}
{code}


  was:
We should create a mutiny component, similar to camel-reactive-streams 
https://github.com/smallrye/smallrye-mutiny


> create a camel-mutiny component
> -------------------------------
>
>                 Key: CAMEL-14381
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14381
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Luca Burgazzoli
>            Priority: Major
>             Fix For: 3.1.0
>
>
> We should create a mutiny component, similar to camel-reactive-streams 
> https://github.com/smallrye/smallrye-mutiny
> {code:java}
> CamelMutiny.on(context)
>     .toMulti(servicenow().table("incident").max(100))
>     .then(m -> doSomething(m))
>     .await().indefinitely();
> {code}
> In Quarkus, we can nicely integrate camel into reactive messaging, like:
> {code:java}
> @Inject
> CamelMutiny mutiny;
> @Outgoing
> Multi<Whatever> fromEndpoint() {
>     return mutiny.toMulti(servicenow().table("incident").max(100));
> }
> @Outgoing
> Multi<Whatever> fromEndpointURI() {
>     return mutiny.toMulti("servicenow:table=incident");
> }
> @Incoming
> void toEndpoint(Multi<Item> items) {
>     return mutiny.subscribeTo(items)
>         .with(servicenow().table("incident").max(100).async());
> }
> @Incoming
> void toEndpointURI(Multi<Item> items) {
>     return mutiny.subscribeTo(items)
>         .with(s"servicenow:table=incident");
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)