activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Leyba" <xle...@gmail.com>
Subject Master/Slave problem
Date Wed, 22 Mar 2006 10:57:36 GMT
Hi

I've configured a master:

[code]

<beans xmlns="http://activemq.org/config/1.0">

  <broker brokerName="BROKER_1" persistent="true" useJmx="true">

    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5"
dataDirectory="/home/jcm/jl/activemq-4.0-SNAPSHOT/activemq-data"
dataSource="#mysql-ds" useJournal="true" useQuickJournal="false">
                                <adapter><bytesJDBCAdapter/></adapter>
                        </journaledJDBC>
    </persistenceAdapter>

    <transportConnectors>
        <transportConnector uri="tcp://172.31.112.9:62002"/>
    </transportConnectors>

  </broker>

  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
            <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
            <property name="url"
value="jdbc:mysql://172.31.112.16/activeMQ?relaxAutoCommit=true"/>
            <property name="username" value="activeMQ"/>
            <property name="password" value="activeMQ"/>
            <property name="poolPreparedStatements" value="true"/>
    </bean>
</beans>

[/code]

and a slave:

[code]

<beans xmlns="http://activemq.org/config/1.0">

  <broker brokerName="BROKER_2"
    persistent="true"
    useJmx="true"
    masterConnectorURI="tcp://172.31.112.9:62002"
    shutdownOnMasterFailure="false">

    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5"
dataDirectory="/home/arqweb/jl/activemq-4.0-SNAPSHOT/activemq-data" da
taSource="#mysql-ds" useJournal="true" useQuickJournal="false" />
    </persistenceAdapter>


        <transportConnectors>
            <transportConnector uri="tcp://172.30.27.1:62003"/>
        </transportConnectors>
  </broker>

    <bean id="mysql-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
            <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
            <property name="url"
value="jdbc:mysql://172.31.112.16/activeMQ?relaxAutoCommit=true"/>
            <property name="username" value="activeMQ"/>
            <property name="password" value="activeMQ"/>
            <property name="poolPreparedStatements" value="true"/>
    </bean>

</beans>

[/code]


I started master and then started slave. Sent messages and listener
received them. After this, I stopped master, sent messages and
listener received without problems.

After this I decided to start master again, sent messages but listener
didn't received them.  :(

My question now is: is this a normal work of master/slave broker or
did I made a mistake in config ?

How could I solve this ?


Thanks in advance

J

Mime
View raw message