zoukankan      html  css  js  c++  java
  • ActiveMq主从机制

    搭建mq主从时会在数据库创建3张关于mq的表:

    下面介绍ACTIVEMQ_LOCK这张表的作用:

    Although the JDBC Store does not offer the best performance, it makes fairly simple to create a simple Master-Slave robust broker setup. 
    When a group of Active MQ brokers is configured to use a shared database, they’ll all try to connect and grab a lock in the lock table,
    but only one will succeed and become the master. The remaining brokers will be slaves, and will be in a wait state, not accepting client
    connections until the master fails.
    尽管JDBC存储并没有提供最佳的性能,但是它使创建一个简单的主-从健壮代理设置变得相当简单。当一组活动MQ代理被配置为使用共享数据库时,它们都将尝试连接并在锁表中获取锁,但只有一个代理将成功并成为主代理。其余的代理将成为奴隶,并处于等待状态,直到主服务器失败才接受客户机连接。
    The lock table, is ACTIVEMQ_LOCK , and it is used to ensure that only one Active MQ broker instance can access the database at one time.
    If an Active MQ broker can’t grab the database lock, that broker won’t initialize fully, and will wait until the lock becomes free, or it’s shut down.

    ACTIVEMQ_LOCK是张锁表,它用于确保一次只能有一个活动MQ代理实例访问数据库。如果活动MQ代理无法获取数据库锁,则该代理将不会完全初始化,并将等待锁变为空闲状态,或者锁被关闭。



  • 相关阅读:
    免费下载小说
    前段博客云库网
    node发送邮件
    node 发送短信
    node生成uuid
    node 控制台颜色
    OfficeCommandbarDesigner20170202.rar
    OfficeCommandbarViewer20171005.rar
    VB.Net 正则表达式测试器
    Windows_Management_Instrumentation
  • 原文地址:https://www.cnblogs.com/Dev0ps/p/10536289.html
Copyright © 2011-2022 走看看