activemq master / slave structure configuration analysis

activemq is an important open source Apache product, the application for the queue to play a significant role in promoting, when in actual project application, through the transmission queue data security is a primary issue to be considered in the activemq configuration provides three mater / slave backup mode:

First, memory backup, the system downtime, the original data is lost, the configuration file as follows:

master broker configuration file, without any particular place, is a standard broker configuration.

<Beans
xmlns = " http://www.springframework.org/schema/beans "
xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance "
xsi: schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd ">

<bean/>

<Broker brokerName = "Master" xmlns = " http://activemq.apache.org/schema/core ">
<transportConnectors>
<transportConnector uri="tcp://localhost:62001"/>
</ TransportConnectors>

</ Broker>

</ Beans>

slave broker configuration file, the red part is very important that the composition of a backup and a master of structure, under normal circumstances, the slave is in standby status, problems arise when the master, slave to working condition.

<Beans
xmlns = " http://www.springframework.org/schema/beans "
xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance "
xsi: schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd ">

<bean/>

<Broker brokerName = "slave" shutdownOnMasterFailure = "false" masterConnectorURI = "TCP: / / localhost: 62,001" xmlns = " http://activemq.apache.org/schema/core ">

<managementContext>
<managementContext createConnector="true" connectorPort ="1098"/>
</ ManagementContext>
<transportConnectors>
<transportConnector uri="tcp://localhost:62002"/>
</ TransportConnectors>

</ Broker>

</ Beans>

Second, use shared file configure master / slave structure:

1, by default, activemq start is to use file as the persistent storage, so when the two broker on the same server on startup,
Not the case with persistenceAdapter that file sharing type of mutual support mechanism.
2 can be configured to share files using persistenceAdapter location, when the broker starts a different server,
To form a mutual support mechanism.

Two profiles, except transportationConnector inconsistent, other things being equal:

<Beans
xmlns = " http://www.springframework.org/schema/beans "
xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance "
xsi: schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd ">

<bean/>

<Broker brokerName = "shared" xmlns = " http://activemq.apache.org/schema/core ">

<! -
In the default case, activemq start is to use file as the persistent storage, so when the two broker on the same server on startup,
Not the case with persistenceAdapter that file sharing type of mutual support mechanism.
Can be configured to share files using persistenceAdapter location, when the broker starts a different server,
To form a mutual support mechanism.
->
<persistenceAdapter>
<journaledJDBC dataDirectory="/sharedFileSystem/broker"/>
</ PersistenceAdapter>

<transportConnectors>
<transportConnector uri="tcp://localhost:62001"/>
</ TransportConnectors>

</ Broker>

</ Beans>
Third, use of database backup and file backup mechanism is basically the same.

分类:Tech 时间:2010-04-09 人气:262
分享到:
blog comments powered by Disqus

相关文章

  • the use of multiple spring xml configuration file and parsing 2010-11-20

    1 contextConfigLocation parameters defined in web.xml. Spring will use this parameter to load. All comma separated xml. If this parameter is, spring loaded by default web-inf/applicationContext.xml file. <context-param> <param-name> contextCon

  • dwr configuration file dwr.xml 2009-06-26

    I dwr Chinese document on a collation do dwr.xml purely jobs they take, there are useful do not forget to top friend you, leave a contact with the exchange of learning! Welcome to my site to exchange technical www.ithuzhu.com dwr.xml is the DWR confi

  • Sping acegi configuration file 2010-05-01

    applicationContext-acegi-security.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <!-- - A simple &qu

  • Jetty6 Guide Book Chapter 4 Jetty service configuration file 2010-03-29

    EDITORIAL: Use the jetty has been a long time, it is a very good web containers and tools to share in this special jetty6 knowledge. Network, there are some information on the jetty, but it used outdated and does not have a systematic, resulting in a

  • [Reprinted] log4j configuration file Xiangjie 2010-08-06

    1, log4j configuration file shows the basic meaning of Second, Log4j log management system is simple to use instructions Third, configure Log4j log4j configuration file Xiangjie 1: log4j configuration file shows the basic meaning of log4j.properties

  • iBatis configuration file Xiangjie 2010-09-23

    ibatis based code include: 1. ibatis example of configuration of a typical configuration file is as follows (the meaning of specific configuration items see below): <? Xml version = "1.0" encoding = "UTF-8"?> <! DOCTYPE sqlMap

  • RED5 introduced in the configuration file 2010-10-12

    Red5 is built on Jetty6 (servlet engine), Mina (networking) basis, and will play through the use of integrating Spring Framework. So we need to have some configuration files. We may load the properties file through simplified configuration, so users

  • mysql security configuration 2010-10-26

    <! - [If gte mso 9]> <xml> <w:WordDocument> <w:View> Normal </ w: View> <w:Zoom> 0 </ w: Zoom> <w:TrackMoves/> < w: TrackFormatting /> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>

  • Tomcat data source configuration 2010-12-16

    A, Tomcat5.0.X data source configuration, modify the $ {tomcat_home} \ conf \ server.xml file <Context path="/JNDITest" docBase="JNDITest" debug="0" crosscontext="true" reloadable="true"> <Resourc

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.599 (s). 12 q(s)