2

私は問題があります。apache camel のドキュメントには、camel-restlet コンポーネント (バージョン 2.10 以降) では、リクエストを処理するスレッドの最大数を定義できると記載されています (http://camel.apache.org/restlet.html)。

このパラメータを指定するにはどうすればよいですか? これが私が作ったルートです

from(
            "restlet:http://localhost:" + config.getEmergencyRESTPort()
                    + "?restletMethods=post,get&restletUriPatterns=#emergencyUriTemplates&maxThreads=64").process(
            new EmergencyServerProcessor(config, emergencyService));

URL で maxThreads パラメータを使用しましたが、機能しません。

エラーは何ですか?

4

1 に答える 1

2

maxThreads は URI オプションではなく、コンポーネント オプションです。

次のような Bean を作成することで、restlet コンポーネントを構成できます。

<bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
    <property name="maxThreads" value="50"/>
</bean>
于 2013-05-10T15:46:16.967 に答える