2016-09-27 2 views
0

아래는 내 뮬 구성입니다. 클라이언트 acknoledge를 사용하여 인정하고 싶습니다. 어떻게해야합니까?클라이언트 확인을 사용하여 노새에서 activemq 메시지를 확인하는 방법은 무엇입니까?

<mule> 
<jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616"   validateConnections="true" doc:name="Active MQ" maxRedelivery="2" persistentDelivery="true"/> 
    <flow name="activemqFlow"> 
    <file:inbound-endpoint path="D:\mule\input" responseTimeout="10000" doc:name="File"/> 
    <object-to-string-transformer doc:name="Object to String"/> 
    <set-property propertyName="fileName" value="#[message.inboundProperties.originalFilename]" doc:name="Property"/> 
    <jms:outbound-endpoint queue="logfilequeue" connector-ref="Active_MQ" doc:name="JMS"> 
     <jms:transaction action="NONE"/> 
    </jms:outbound-endpoint> 

</flow> 
<flow name="JmsInboundFlow"> 
    <jms:inbound-endpoint queue="logfilequeue" connector-ref="Active_MQ" doc:name="JMS"> 
     <jms:client-ack-transaction action="ALWAYS_BEGIN"/> 
    </jms:inbound-endpoint> 
    <logger message="#[payload.toString()]" level="INFO" doc:name="Logger"/> 
    <file:outbound-endpoint path="D:\mule\output" responseTimeout="10000" doc:name="File" outputPattern="#[message.inboundProperties.fileName]"/> 
</flow> 
</mule> 

답변

1

주 동안이 질문을 참조 할 수 있습니다 : 당신은 대부분의 사람들이 생각하는 것처럼 작동하지 않습니다 CLIENT_ACKNOWLEDGE를 사용하려면 정말해야합니다. 그것은 현재 메시지와 세션 내 모든 이전 것을 의미합니다. 병렬/스레드 소비자가있는 경우이 설정은 아직 승인되지 않은 메시지를 실수로 보냅니다. ActiveMQ에는 ack가 단일 메시지 인 INDIVIDUAL_ACKNOWLEDGE가 있습니다.

JMS Spec 2.0에는이 추가 기능을 표준으로 만들기위한 요구 사항이 있습니다.

+0

가리켜 주셔서 감사합니다! 몇 가지 추가 지원 정보 : http://technofes.blogspot.com/2011/07/mule-jms-jms-connector-acknowledgement.html –

관련 문제