1 2 Previous Next 24 Replies Latest reply on Sep 8, 2011 10:51 AM by mmeyka Go to original post
      • 15. Re: Transfer messages from stand alone hornetq to jbossmq
        mmeyka

        Config is like this. When I start the bridge sends to master everything is fine. When master is killed backup takes over. I tested with a JMS client (JNDI lookup) that failover works. But the bridge is not forwarding to the backup. Messages are stored in SendQueue. When Master recovers all messages are forwarded and everything works fine again. I tried to add a {noformat}<ha>true</ha>{noformat} to the bridge like the schema offers but the parser rejected this (somehow desperate) idea. I have no idea why the bridge refuses to talk to the backup.

         

        {noformat}

        {code:xml}

        <connectors>

                <connector name="hQMaster-connector">

                    <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                    <param key="host" value="${hornetq.remoting.netty.host.Master:10.2.12.46}"/>

                    <param key="port" value="${hornetq.remoting.netty.port.Master:10296}"/>

                </connector>

                <connector name="hQBackup-connector">

                    <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                    <param key="host" value="${hornetq.remoting.netty.host.Backup:10.2.12.47}"/>

                    <param key="port" value="${hornetq.remoting.netty.port.Backup:10296}"/>

                </connector>

            </connectors>

         

         

            <bridges>

                <bridge name="master-bridge">

                    <queue-name>jms.queue.SendQueue</queue-name>

                    <forwarding-address>jms.queue.MasterProcessQueue</forwarding-address>

                    <reconnect-attempts>-1</reconnect-attempts>

                    <failover-on-server-shutdown>false</failover-on-server-shutdown>

                    <use-duplicate-detection>false</use-duplicate-detection>

                    <static-connectors>

                        <connector-ref>hQMaster-connector</connector-ref>

                        <connector-ref>hQBackup-connector</connector-ref>

                    </static-connectors>

                </bridge>

            </bridges>

        {code}

        {noformat}

        • 16. Re: Transfer messages from stand alone hornetq to jbossmq
          ataylor

          are your nodes marked as clustered and is HA=true on the bridge

          • 17. Re: Transfer messages from stand alone hornetq to jbossmq
            mmeyka

            adding ha to the bridge leads to an exception in parsing even though I stick to element order given in the schema

             

             

            {noformat}

            {code:xml}

                <bridges>

                    <bridge name="master-bridge">

                        <queue-name>jms.queue.SendQueue</queue-name>

                        <forwarding-address>jms.queue.MasterProcessQueue</forwarding-address>

                        <ha>true</ha>

                        <reconnect-attempts>-1</reconnect-attempts>

                        <failover-on-server-shutdown>false</failover-on-server-shutdown>

                        <use-duplicate-detection>false</use-duplicate-detection>

                        <static-connectors>

                            <connector-ref>hQMaster-connector</connector-ref>

                            <connector-ref>hQBackup-connector</connector-ref>

                        </static-connectors>

                    </bridge>

                </bridges>

            {code}

            {noformat}

             

             

            [WrapperSimpleAppMain] 16:05:53,478 SEVERE [org.hornetq.utils.XMLUtil]  Invalid configuration

            org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'exclusive'. One of '{"urn:hornetq":forwarding-address}' is expected.

                    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

            • 18. Re: Transfer messages from stand alone hornetq to jbossmq
              mmeyka

              Sorry for bothering you with this stupid parse exception as it was of course my fault.

              But the original problem remains. The bridge (configured as above with HA) sends to the master node but if master disappears it does not send to backup. If master recovers everything is fine again. I checked the cluster that it works fine and the adresses are correct. The backup itself behaves fine as well, e.g. taking over all unsent messages from the journal. It seems to be only the bridge that does not failover properly. I checked the log with FINEST but got no hint to the connectors the bridge is using.

              Do you have any hint how I can analyse further ? Thanks for your help

              • 19. Re: Transfer messages from stand alone hornetq to jbossmq
                ataylor

                I cant really say, if you post your full confog maybe something will pop out, Im on holiday from today tho so may not get around to it till i get back, unless clebert can

                • 20. Re: Transfer messages from stand alone hornetq to jbossmq
                  mmeyka

                  Is there a way to send you the tgz'ed configs ?

                  • 21. Re: Transfer messages from stand alone hornetq to jbossmq
                    ataylor

                    switch to advanced editor and attach them

                    • 22. Re: Transfer messages from stand alone hornetq to jbossmq
                      mmeyka

                      Here we go ..

                      • 23. Re: Transfer messages from stand alone hornetq to jbossmq
                        mmeyka

                        I think I found the reason ... the class org.hornetq.core.config.BridgeConfiguration seems to have a bug.

                        There are two constructor, one containing static-connectors and the other containing discovery-group

                        The one for static-connectors is missing to set the attribute 'ha' even though the value is present as parameter.

                        This is reason why a core bridge with static connectors will never fail over properly.

                        • 24. Re: Transfer messages from stand alone hornetq to jbossmq
                          mmeyka

                          in 2.2.2 as well as 2.2.5

                          1 2 Previous Next