Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:07:00+00:00 2026-06-14T12:07:00+00:00

I am trying to make a request to an inbound http endpoint that uses

  • 0

I am trying to make a request to an inbound http endpoint that uses <recipient-list> and a Custom Aggregator to combine multiple results. How do I get my inbound http endpoint to “wait” for the result of the Custom Aggregator?

Here are my sample flows. The Aggregator works perfectly. But because is asynchronous, the inbound http endpoint returns immediately. What I’d really like to do is return the result from the Custom Aggregator as a response to the http endpoint. I feel like I am missing something simple.

<flow name="AggregationExample">
    <http:inbound-endpoint
        exchange-pattern="request-response"
        host="localhost"
        port="8082"
        path="test/aggregate"
        />  

    <recipient-list evaluator="groovy" expression="['vm://source1','vm://source2']"></recipient-list>

        <!-- How do I wait for result of custom aggregator? -->
</flow>

<flow name="SourceAggregation">
    <vm:inbound-endpoint path="sourceresult" />

    <custom-aggregator failOnTimeout="true" class="com.example.MySourceAggregator"/>

    <logger message="RESULTS: #[payload]"/>
</flow>

<flow name="Source1">
    <vm:inbound-endpoint path="source1" />

    <set-payload value="#[groovy:Thread.currentThread().getContextClassLoader().getResourceAsStream('example-source1.json').text]"/>

    <vm:outbound-endpoint path="sourceresult" />
</flow>

<flow name="Source2">
    <vm:inbound-endpoint path="source2" />

    <set-payload value="#[groovy:Thread.currentThread().getContextClassLoader().getResourceAsStream('example-source2.json').text]"/>

    <vm:outbound-endpoint path="sourceresult" />
</flow>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:07:01+00:00Added an answer on June 14, 2026 at 12:07 pm

    Use a request-reply router in the AggregationExample flow instead of a recipient list: dispatch to another flow that does the dispatching to Source1 and Source2.

    Generally speaking, I’m unsure about what you’re trying to achieve though: did you build this contraption just to read two files in parallel? Or is there more to it? If just for that, are you sure it’s really worth it: aren’t there any physical limitations to concurrent file reads? If it’s all for optimization, caching would potentially be a better path.

    Also, if the recipients in recipient-list are static, why using this router and not an all router?

    Finally, did you have issues with MEL that you’re using Groovy expressions to read the files instead?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make this request to the RunKeeper API : GET /user HTTP/1.1
So i am trying to make an http request using ASIHTTPRequest class , to
I'm trying to make an ajax request recursively upon each success response that is
Trying to make a cross protocol, same domain request from https to http. I
I'm trying to make a request to a website this way : file_get_contents('http://www.yahoo.com/index.php?var=value'); in
I'm trying to make a request to a page, and save the cookie that
I'm trying to make a HTTP request through an open SOCKS5 proxy. I have
I am trying to make a simple request using http.get. But I need to
With RavenDB, using Fiddler2, I'm trying to make a request to get multiple documents
I'm trying to make a request which uses both bibleontology and dbpedia semantic databases:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.