여러 개의 camelContext가 생성되었으며 각각의 camelContext에서 고유 한 사용자 정의 스레드 풀을 사용하고자합니다. 그러나 로그에는 내 모든 camelContext가 동일한 스레드 풀을 사용하고 있음을 보여줍니다. 내가 뭘 놓치고 있니?카멜 컨텍스트의 스레드 풀 구성
홈페이지 낙타는 방법 "loadJsontoCreateRoute는"세 JSON 파일을 읽고 다음 세 가지 경로를 생성합니다
<camelContext id="routeLoader_route">
(no threadpool defined)
<route id="RouteCreator" >
<from uri="file://jsonFilePath" />
<bean ref="routeMonitor" method="loadJsontoCreateRoute" />
</route>
(some other routes defined)
</camelContext>
상황이
- 엔드 포인트에서 연결 "파일 : // XXX1 인/아웃" 엔드 포인트 "direct-vm : out.test"
- 엔드 포인트 "file : // xxx2/out"엔드 포인트 "direct-vm : out.test"
- 전자 ndpoint "파일 : // xxx3 인/아웃", "직접 VM을 : out.test"엔드 포인트 dynamicRoute 방법은 FTP 구성 요소에 대한 URI를 반환합니다
<camelContext id="test_out_route"> <threadPoolProfile id="outTestThreadPoolProfile" defaultProfile="true" poolSize="1" maxPoolSize="1" maxQueueSize="1000" rejectedPolicy="CallerRuns"/> <route id="outboundTestingRouter"> <from uri="direct-vm:out.test"/> <doTry> <log message="Outbound Test -- START" loggingLevel="INFO" /> <recipientList> <method ref="outTestBean" method="dynamicRoute" /> </recipientList> <doFinally> <log message="Outbound Test-- END" loggingLevel="INFO" /> <stop/> </doFinally> </doTry> </route> (Some other routes defined) </camelContext>
또 다른 낙타 컨텍스트
로그인
20160623 09:48:04.297 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.524 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.526 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.527 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.634 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.636 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.652 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.653 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.749 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.749 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.827 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.827 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.890 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.937 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:04.937 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:04.999 [Camel (routeLoader_route) thread #24 - file://xxx3/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:05.140 [Camel (routeLoader_route) thread #5 - file://xxx1/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:05.358 [Camel (routeLoader_route) thread #5 - file://xxx1/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:05.358 [Camel (routeLoader_route) thread #5 - file://xxx1/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:05.469 [Camel (routeLoader_route) thread #5 - file://xxx1/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:05.471 [Camel (routeLoader_route) thread #5 - file://xxx1/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:05.593 [Camel (routeLoader_route) thread #5 - file://xxx1/out] INFO outboundTestingRouter - Outbound Test -- END
20160623 09:48:05.905 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- START
20160623 09:48:05.999 [Camel (routeLoader_route) thread #17 - file://xxx2/out] INFO outboundTestingRouter - Outbound Test -- END
3 호선 로그가 풀 크기 outTestThreadPoolProfile 내 스레드 1
에 한계가있는 동안 1 개 이상 outboundTestingRouter 경로가 동시에 실행되고 있다는 것을 보여줍니다의 10 라인이 스레드 풀의 outTestThreadPoolProfile이 outboundTestingRouter 경로에서 사용하지 않는 것을 나타냅니다
무엇 내가 원하는 것은 최대를 제한하는 것입니다. 경로 outboundTestingRouter의 동시 사용 수입니다.
스레드 풀 크기와 로그를 편집하여 왜 스레드 풀이 사용되고 있지 않은지 설명합니다. – hk6279
스레드 풀 규칙 구문을 시도하고 수동으로 서비스 실행 프로그램을 제공하십시오. –
threadpool 태그를 outboundTestingRouter 경로에 추가 한 후 작동합니다. 직접적인 VM 구성 요소가 호출자 스레드를 사용하고 있다고 생각합니다. 그 이유는 스레드 풀이 작동하고있는 것을 볼 수없는 이유입니다. – hk6279