博客已搬家,更好阅读体验,猛戳http://www.jack-yin.com/english/translation/activemq-in-action/1645.html
10.1 Configuring ActiveMQ for high availability
10.1 配置 高可用性ActiveMQ
When an application is deployed into a production environment, it’s important
to plan for disaster scenarios—network failures, hardware failures, software
failures, or power outages. ActiveMQ can be deployed defensively, to prevent
such failures from inhibiting your application in production. Typically you need
to run multiple ActiveMQ brokers on different machines, so that if one machine
or one ActiveMQ broker fails, a secondary one can take over. Using ActiveMQ
terminology, such deployments are known as master/slave, where one broker takes
the role of the primary or master and there are one or more slave brokers that
wait for the master to fail, at which point one will take over to become the new
master. The ActiveMQ Java and C++ clients provide a built-in failover transfer,
so that they’ll automatically switch over from the failed master to the new
master without message loss.
将应用程序部署到生产环境中时,为诸如网络故障,硬件,软件故障,或者意外断电等
灾难场景制定应对计划十分重要.ActiveMQ可以做预防性部署,以便在上述系统
灾难发生时,阻止应用程序发送故障.通常,你需要在不同的机器上同时运行多个
ActiveMQ代理,以便在一个机器或ActiveMQ代理发生故障时,其他的备用机器
可以接管继续工作.在ActiveMQ的术语中,这种部署方式被称为主/备结构,即,一个
代理作为主机,其他一个或多个备用代理等待主机失效,一旦主机失效,其中之一的
备机将立刻接管变成新的主机继续主机的工作.ActiveMQ的Java和C++客户端提供
内建的失效转移传输,因此它们会自动的从失败的主机转换到新的主机上并且不会
造成消息丢失.
......