camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arunodhaya80 <t...@arunma.com>
Subject Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?
Date Tue, 01 Oct 2013 10:28:10 GMT
Please excuse stupidity as this is my first Camel application 

1. To respond to a web request, I am sourcing the content from two different
sources. 
2. I am, therefore, making a multicast request to two methods and
parallelizing it.
3. The response is an marshalled JSON object (using camel-jackson)

All works fine. 

    public class RestToBeanRouter extends RouteBuilder{

    @Override
    public void configure() throws Exception {

        from("cxfrs://bean://rsServer")
               
                .multicast()
                .parallelProcessing()
                .aggregationStrategy(new CoreSearchResponseAggregator())
                .beanRef("searchRestServiceImpl", "firstMethod")
                .beanRef("searchRestServiceImpl", "secondMethod")
                .end()
                .marshal().json(JsonLibrary.Jackson)
                .to("log://camelLogger?level=DEBUG");
                
    }


**Question :** 

The Multicast routing expects a `to` in the DSL.  Currently, I am mapping
this to a `log` endpoint.  Is this fine? 

Since I am not using the `to` and the last exchange of the Aggregator
strategy is the one which is returned to the user, should my endpoint be
configured to something else - like a null or something? (Ah, the stupidity
kicks in)



--
View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Multicast-Is-there-a-null-or-a-similar-endpoint-tp5740664.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message