2014-06-17 5 views
0

여러 JBoss 인스턴스에 배포 된 많은 모듈로 구성된 응용 프로그램이 있습니다. 이들 모듈은 JMS를 통해 서로 버전 번호를 방송합니다.멀티 캐스트에서 Apache Camel 차단

다음과 같은 방식으로 작동합니다. 여기

camelTemplate.asyncSendBody(moduleVersionsOutputChannel, new ArrayList<>(moduleVersions)); 

moduleVersionsOutputChannel의 정의이다 : 각 모듈은 주기적으로 다음과 같이 그 버전을 방송

<endpoint id="moduleVersionsOutputChannel" uri="direct:module.versions.output.channel"/> 

다음 (아래 source로 함) moduleVersionsOutputChannel에서 메시지를 소비 경로 거기 주제에 메시지를 게시 :

from(source).multicast() 
     .parallelProcessing().timeout(moduleVersionsMonitoringConfig.getMulticastTimeout()) 
     .to(moduleVersionsMonitoringConfig.getChannels()) 
     .id(moduleVersionsService.getCurrentModuleId() + "-outbound"); 

처음에는 모든 것이 잘 작동하지만 시간이 지나면 (시간 또는 일) 스레드는 멀티 캐스트가 차단되었습니다. 나는 2 개의 다른 점에서 블록을 관찰한다.

첫 번째 블록은 asyncSendBody가 호출되는 스레드에서 발생합니다

"Camel (moduleVersionsContext) thread #1044 - [email protected]" daemon prio=5 tid=0xa16 nid=NA waiting 
    java.lang.Thread.State: WAITING 
     at sun.misc.Unsafe.park(Unsafe.java:-1) 
     at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) 
     at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) 
     at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994) 
     at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303) 
     at java.util.concurrent.Semaphore.acquire(Semaphore.java:472) 
     at org.hornetq.core.client.impl.ClientProducerCreditsImpl.acquireCredits(ClientProducerCreditsImpl.java:90) 
     at org.hornetq.core.client.impl.ClientProducerImpl.sendRegularMessage(ClientProducerImpl.java:307) 
     at org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:288) 
     at org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:140) 
     at org.hornetq.jms.client.HornetQMessageProducer.doSend(HornetQMessageProducer.java:438) 
     at org.hornetq.jms.client.HornetQMessageProducer.send(HornetQMessageProducer.java:205) 
     at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:589) 
     at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:336) 
     at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:275) 
     at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:217) 
     at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$1.doInJms(JmsConfiguration.java:231) 
     at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466) 
     at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:228) 
     at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:431) 
     at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:385) 
     at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:153) 
     at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110) 
     at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) 
     at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) 
     at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) 
     at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105) 
     at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:712) 
     at org.apache.camel.processor.MulticastProcessor.access$200(MulticastProcessor.java:83) 
     at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:293) 
     at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:278) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:744) 
:

"[email protected]" prio=5 tid=0x423 nid=NA waiting 
    java.lang.Thread.State: WAITING 
     at sun.misc.Unsafe.park(Unsafe.java:-1) 
     at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) 
     at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) 
     at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994) 
     at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303) 
     at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236) 
     at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:328) 
     at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:214) 
     at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) 
     at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) 
     at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) 
     at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73) 
     at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:378) 
     at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:346) 
     at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:242) 
     at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:346) 
     at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:184) 
     at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:124) 
     at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:137) 
     at org.apache.camel.impl.DefaultProducerTemplate$14.call(DefaultProducerTemplate.java:621) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
     at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2025) 
     at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) 
     at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) 
     at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) 
     at org.apache.camel.impl.DefaultProducerTemplate.asyncSendBody(DefaultProducerTemplate.java:626) 
     at ... 

또 다른 시간 실제로 주제를 JMS하는 메시지를 게시하려고 나중에에서 실행 블록

Camel 구성에 버그가 있는지 또는 낙타 문제를 알고 있으며 해결 방법이 있습니까?

환경 :

  • 아파치 낙타 2.12.3
  • 보스 6.1 EAP
  • 오픈 JDK 1.7.0_55
  • 우분투 리눅스 12.04 LTS
+0

이 문제에 대한 해결책을 찾았습니까? – John

+0

불행히도 no – wheleph

답변