activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fec <fec...@gmail.com>
Subject Config network of 2 broker + persistence in mysql
Date Tue, 21 Jul 2009 11:41:41 GMT

Hi all,

I´m newbie working with ActiveMQ, i read a lot how to config a network of
brokers, also about persistence in database, but the communication between
brokers doesn´t work properly. 

This are my activemq.xml files::

BROKER A

    <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false"
brokerName="brokera">

    <persistenceAdapter>
        <journaledJDBC dataDirectory="${activemq.base}/data"
dataSource="#mysql-ds" useDatabaseLock="false"/>
    </persistenceAdapter>

    <networkConnectors>
        <networkConnector name="brokerb"
uri="static://(tcp://localhost:61616)"/>
    </networkConnectors>

    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://localhost:61716" />
        <transportConnector name="stomp" uri="stomp://localhost:61713"/>
    </transportConnectors>

    <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://localhost:3306/activemq?relaxAutoCommit=true"/>
      <property name="username" value="activemq"/>
      <property name="password" value="activemq"/>
      <property name="maxActive" value="200"/>
      <property name="poolPreparedStatements" value="false"/>
    </bean>

BROKER B

		<broker xmlns="http://activemq.apache.org/schema/core" useJmx="false"
brokerName="brokerb" >

    <persistenceAdapter>
        <journaledJDBC dataDirectory="${activemq.base}/data"
dataSource="#mysql-ds" useDatabaseLock="false"/>
    </persistenceAdapter>

    <networkConnectors>
        <networkConnector name="brokera"
uri="static://(tcp://localhost:61716)"/>
    </networkConnectors>

    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://localhost:61616"/>
        <transportConnector name="stomp" uri="stomp://localhost:61613"/>
    </transportConnectors>

    <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://localhost:3306/activemqb?relaxAutoCommit=true"/>
      <property name="username" value="activemqb"/>
      <property name="password" value="activemqb"/>
      <property name="maxActive" value="200"/>
      <property name="poolPreparedStatements" value="false"/>
    </bean>


I need a cluster with 2 brokers active/active, and persistence in a mysql.

Thank you very much and best regards.

Fec
-- 
View this message in context: http://www.nabble.com/Config-network-of-2-broker-%2B-persistence-in-mysql-tp24586122p24586122.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message