2012-11-14 4 views
1

두 개의 원본 서버 인 server # 0과 server # 1과 target server server # 2가 있습니다. 각 원본 서버에는 서버 # 2에 연결하는 코어 브리지가 있습니다. 중복 메시지 감지가 HornetQ 코어 브리지에서 올바르게 작동하지 않습니다.

  • 서버 # 1 큐 Q # 1 (소스)가

    1. 서버 # 0 큐 Q # 0 (소스)가 2가
    2. 서버 번호 (모든 서버는 독립이며 2.2.14)

      1. 클라이언트는 Q # 0
      2. Q에 메시지를 보낸다 대기열 Q # 2 (타겟)

      이 시나리오를 생각해 # 2

    3. 클라이언트는 Q 번호로 메시지를 전송 (브리지를 통해) 성공적으로 모든 메시지를 수신 한
    4. 서버 # 2는 말한다 : 메시지 (각 메시지에 대해) 감지 아무것도 Q 번호에서 Q # 2에 추가되지 중복 1

    서버 # 메시지 양식의 Q # 1받는 2 메시지 :

    [Old I/O server worker (parentId: 2184190, [id: 0x002153fe, localhost/127.0.0.1:6445])] 
    14-Nov 13:38:27,300 WARNING [PostOfficeImpl] Duplicate message detected through the bridge - message will not be routed. 
    Message information: ServerMessage[messageID=25769805298,priority=4, bodySize=302,expiration=0, durable=true, address=jms.queue.target, properties=TypedProperties[{_HQ_BRIDGE_DUP=[[email protected]}]]@32041289 
    

    통지 될를 그 클라이언트는 Q # 1 대신 Q # 0에 메시지를 전송 한 다음 Q 메시지를 보내기 시작하면 # 0,이 문제가 다시 발생했습니다! (q # 1 메시지 용)

    버그입니까? 어떻게해야합니까?

    서버 # 0 (hornetq 구성)

    <queues> 
        <queue name="jms.queue.source"> 
         <address>jms.queue.source</address> 
        </queue> 
    </queues> 
    
    <bridges> 
        <bridge name="bridge-to-server2"> 
         <queue-name>jms.queue.source</queue-name> 
         <forwarding-address>jms.queue.target</forwarding-address> 
         <reconnect-attempts>-1</reconnect-attempts> 
         <static-connectors> 
          <connector-ref>remote-connector</connector-ref> 
         </static-connectors> 
        </bridge> 
    </bridges> 
    
    <!-- connector to server#2 --> 
    <connector name="remote-connector"> 
        <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory 
        </factory-class> 
        <param key="host" value="localhost" /> 
        <param key="port" value="6445" /> 
    </connector> 
    

    서버 # 1 (hornetq 구성)

    <queues> 
        <queue name="jms.queue.source"> 
         <address>jms.queue.source</address> 
        </queue> 
    </queues> 
    
    <bridges> 
        <bridge name="bridge-to-server2"> 
         <queue-name>jms.queue.source</queue-name> 
         <forwarding-address>jms.queue.target</forwarding-address> 
         <reconnect-attempts>-1</reconnect-attempts> 
         <static-connectors> 
          <connector-ref>remote-connector</connector-ref> 
         </static-connectors> 
        </bridge> 
    </bridges> 
    
    <!-- connector to server#2 --> 
    <connector name="remote-connector"> 
        <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory 
        </factory-class> 
        <param key="host" value="localhost" /> 
        <param key="port" value="6445" /> 
    </connector> 
    

    서버 # 2 (hornetq 구성)

    <connectors> 
        <connector name="netty-connector"> 
         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory 
         </factory-class> 
         <param key="host" value="localhost" /> 
         <param key="port" value="6445" /> 
        </connector> 
    </connectors> 
    
    <acceptors> 
        <acceptor name="netty-acceptor"> 
          <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory 
          </factory-class> 
          <param key="host" value="localhost" /> 
          <param key="port" value="6445" /> 
        </acceptor> 
    </acceptors> 
    

    서버 # 2 (hornetq-JMS) :

    <queue name="target"> 
        <entry name="/queue/target" /> 
    </queue> 
    
  • 답변

    0

    당신은 확인해야 매개 변수

    사용 중복 감지하여 HornetQ-의 configuration.xml 파일에

    .

    기본값은 true이므로 false로 설정하십시오.

    경우 새 HornetQ 책

    www.amazon.com/dp/1849518408/?tag=packtpubli-20

    +0

    사용 중복 감지 될 필요가있다 참된! q # 0과 q # 1로 전송 된 메시지는 다릅니다. 나는 왜 서버 # 2가 중복 때문에 떨어지는 지 전혀 모른다! – united

    관련 문제