Apache Camelでは、ルートを定義していますが、2つ以上のhttpリクエストを並行して送信し、AsyncHttpClientを使用したJavaのような処理を行うための 'future'を待つ方法はありますか?Apache Camel:2つのhttpリクエストを並行して送信し、応答を待つ方法
AsyncHttpClient asyncHttpClient = new DefaultAsyncHttpClient();
Future<Response> f = asyncHttpClient.prepareGet("http://www.example.com/").execute();
Response r = f.get();
コンテキストの場合、次のルートはGET contactsのhttp呼び出しを呼び出し、応答を同期的に返します。
from("direct:getContact")
.to("http://host:port/contacts/1453")
を参照してください:http://camel.apache.org/async.html –
おかげでマシュー、 私は非同期APIを試しました。 ProducerTemplateを使用して、いくつかの困難に直面しています。私はそれを正しくやっているかどうか見てみてください。 http://stackoverflow.com/questions/37409460/apache-camel-producertemplate-not-unmarshalling-the-response – ndsurendra