2009-12-14 2 views
0

activeMQ 5.3을 사용하여 blazeds 3.2를 통해 flex 클라이언트에 메시지를 보내고 있습니다.flex 클라이언트가 연결을 끊을 때 ActiveMQ가 구독을 중지하지 않습니다.

클라이언트가 처음으로 연결되면 activeMQ 브로커에 대한 가입을 확인할 수 있습니다. 그러나 클라이언트를 실행하는 브라우저를 종료 한 후에는 메시지가 더 이상 소비되지 않아도 구독은 열린 상태로 유지됩니다. 결국 웹 서버가 메모리 부족으로 끝납니다. 로그에서 블레이즈가 피드 구독을 취소 한 것처럼 보입니다.

더 이상 연결하지 않는 클라이언트가 없는데 블레셋이 구독을 중지해서는 안되며 그 이유는 무엇입니까?

아래 로그 파일에서 스 니펫을 찾을 수 있습니다.

 
... 
STARTING WEB SERVER 
... 
14 Dec 2009 15:54:59,015 [main] DEBUG activemq.transport.vm.VMTransportFactory - binding to broker: localhost 
14 Dec 2009 15:54:59,031 [main] INFO apache.activemq.broker.TransportConnector - Connector vm://localhost Started 
14 Dec 2009 15:54:59,031 [main] INFO apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker (localhost, ID:pcjbe-2026-1260802498843-0:0) started 
... 
CONNECTING WITH CLIENT 
... 
14 Dec 2009 15:55:03,953 [VMTransport] DEBUG apache.activemq.broker.TransportConnection - Setting up new connection: vm://localhost#4 
14 Dec 2009 15:55:03,968 [VMTransport] DEBUG activemq.broker.region.AbstractRegion - localhost adding consumer: ID:pcjbe-2026-1260802498843-2:2:-1:1 for destination: topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic 
14 Dec 2009 15:55:03,968 [http-8000-3] INFO flex.messaging.jms.JmsAdapter - client [AEE95CCE-816B-EBCC-2ACE-41508E3338AC] subscribed to destination [detectorsFeed] 
14 Dec 2009 15:55:03,968 [VMTransport] DEBUG activemq.broker.region.AbstractRegion - localhost adding consumer: ID:pcjbe-2026-1260802498843-2:2:1:1 for destination: topic://tmsng.topic.detectors 
14 Dec 2009 15:55:03,968 [VMTransport] DEBUG activemq.broker.region.AbstractRegion - localhost adding destination: topic://tmsng.topic.detectors 
14 Dec 2009 15:55:03,968 [VMTransport] DEBUG activemq.broker.region.AbstractRegion - localhost adding destination: topic://tmsng.topic.detectors 
14 Dec 2009 15:55:03,968 [VMTransport] DEBUG activemq.broker.region.AbstractRegion - localhost adding destination: topic://ActiveMQ.Advisory.Consumer.Topic.tmsng.topic.detectors 
[BlazeDS]12/14/2009 15:55:03.968 [DEBUG] [Client.MessageClient] MessageClient created with clientId 'AEE95CCE-816B-EBCC-2ACE-41508E3338AC' for destination 'detectorsFeed'. 
... 
DISCONNECTING CLIENT 
... 
14 Dec 2009 15:58:55,156 [http-8000-8] INFO flex.messaging.jms.JmsAdapter - client [AEF0AC64-7B6C-2749-8860-252B8A302EBA] unsubscribed from destination [detectorsFeed] 
[BlazeDS]12/14/2009 15:58:55.156 [DEBUG] [Client.MessageClient] MessageClient with clientId 'AEF0AC64-7B6C-2749-8860-252B8A302EBA' for destination 'detectorsFeed' has been invalidated. 

당신은 연결

을 폐쇄하지의 BlazeDS에 문제처럼 보입니까

<beans xmlns="http://www.springframework.org/schema/beans" ...> 

<amq:broker brokerName="localhost" useJmx="true" persistent="false" dataDirectory="${INSTALLDIR}/var" > 
    <amq:destinationPolicy> 
     <amq:policyMap> 
      <amq:policyEntries> 
       <amq:policyEntry topic=">" producerFlowControl="false"> 
        <amq:pendingSubscriberPolicy> 
         <amq:vmCursor/> 
        </amq:pendingSubscriberPolicy> 
       </amq:policyEntry> 
      </amq:policyEntries> 
     </amq:policyMap> 
    </amq:destinationPolicy> 

    <amq:managementContext> 
     <amq:managementContext createConnector="false"/> 
    </amq:managementContext> 

    <amq:systemUsage> 
     <amq:systemUsage sendFailIfNoSpace="true"> 
      <amq:memoryUsage> 
       <amq:memoryUsage limit="10mb" /> 
      </amq:memoryUsage> 
     </amq:systemUsage> 
    </amq:systemUsage> 

    <amq:transportConnectors> 
     <amq:transportConnector uri="vm://localhost" /> 
    </amq:transportConnectors> 
</amq:broker> 

<!-- JMS ConnectionFactory to use, configuring the embedded broker using XML --> 
<amq:connectionFactory id="connectionFactory" brokerURL="vm://localhost" alwaysSessionAsync="true"> 
    <amq:prefetchPolicy> 
     <!-- For pooled connections, set the prefetch to 1 to avoid out-of-order messages. (see http://activemq.apache.org/what-is-the-prefetch-limit-for.html) --> 
     <amq:prefetchPolicy all="1"/> 
    </amq:prefetchPolicy> 
</amq:connectionFactory> 

<!-- a pooling based JMS provider --> 
<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop"> 
    <property name="connectionFactory" ref="connectionFactory" /> 
</bean> 

<amq:topic id="detectorTopic" physicalName="tmsng.topic.detectors" /> 

안부 에게 ActiveMQ를 위해에

답변

0

를 사용하는 구성을 찾을 수 아래