RocketMQ(7)——通訊協議
阿新 • • 發佈:2019-01-27
// Broker 傳送訊息 public static final int SEND_MESSAGE = 10; // Broker 訂閱訊息 public static final int PULL_MESSAGE = 11; // Broker 查詢訊息 public static final int QUERY_MESSAGE = 12; // Broker 查詢Broker Offset public static final int QUERY_BROKER_OFFSET = 13; // Broker 查詢Consumer Offset public static final int QUERY_CONSUMER_OFFSET = 14; // Broker 更新Consumer Offset public static final int UPDATE_CONSUMER_OFFSET = 15; // Broker 更新或者增加一個Topic public static final int UPDATE_AND_CREATE_TOPIC = 17; // Broker 獲取所有Topic的配置(Slave和Namesrv都會向Master請求此配置) public static final int GET_ALL_TOPIC_CONFIG = 21; // Broker 獲取所有Topic配置(Slave和Namesrv都會向Master請求此配置) public static final int GET_TOPIC_CONFIG_LIST = 22; // Broker 獲取所有Topic名稱列表 public static final int GET_TOPIC_NAME_LIST = 23; // Broker 更新Broker上的配置 public static final int UPDATE_BROKER_CONFIG = 25; // Broker 獲取Broker上的配置 public static final int GET_BROKER_CONFIG = 26; // Broker 觸發Broker刪除檔案 public static final int TRIGGER_DELETE_FILES = 27; // Broker 獲取Broker執行時資訊 public static final int GET_BROKER_RUNTIME_INFO = 28; // Broker 根據時間查詢佇列的Offset public static final int SEARCH_OFFSET_BY_TIMESTAMP = 29; // Broker 查詢佇列最大Offset public static final int GET_MAX_OFFSET = 30; // Broker 查詢佇列最小Offset public static final int GET_MIN_OFFSET = 31; // Broker 查詢佇列最早訊息對應時間 public static final int GET_EARLIEST_MSG_STORETIME = 32; // Broker 根據訊息ID來查詢訊息 public static final int VIEW_MESSAGE_BY_ID = 33; // Broker Client向Client傳送心跳,並註冊自身 public static final int HEART_BEAT = 34; // Broker Client登出 public static final int UNREGISTER_CLIENT = 35; // Broker Consumer將處理不了的訊息發回伺服器 public static final int CONSUMER_SEND_MSG_BACK = 36; // Broker Commit或者Rollback事務 public static final int END_TRANSACTION = 37; // Broker 獲取ConsumerId列表通過GroupName public static final int GET_CONSUMER_LIST_BY_GROUP = 38; // Broker 主動向Producer回查事務狀態 public static final int CHECK_TRANSACTION_STATE = 39; // Broker Broker通知Consumer列表變化 public static final int NOTIFY_CONSUMER_IDS_CHANGED = 40; // Broker Consumer向Master鎖定佇列 public static final int LOCK_BATCH_MQ = 41; // Broker Consumer向Master解鎖佇列 public static final int UNLOCK_BATCH_MQ = 42; // Broker 獲取所有Consumer Offset public static final int GET_ALL_CONSUMER_OFFSET = 43; // Broker 獲取所有定時進度 public static final int GET_ALL_DELAY_OFFSET = 45; // Namesrv 向Namesrv追加KV配置 public static final int PUT_KV_CONFIG = 100; // Namesrv 從Namesrv獲取KV配置 public static final int GET_KV_CONFIG = 101; // Namesrv 從Namesrv獲取KV配置 public static final int DELETE_KV_CONFIG = 102; // Namesrv 註冊一個Broker,資料都是持久化的,如果存在則覆蓋配置 public static final int REGISTER_BROKER = 103; // Namesrv 解除安裝一個Broker,資料都是持久化的 public static final int UNREGISTER_BROKER = 104; // Namesrv 根據Topic獲取Broker Name、佇列數(包含讀佇列與寫佇列) public static final int GET_ROUTEINTO_BY_TOPIC = 105; // Namesrv 獲取註冊到Name Server的所有Broker叢集資訊 public static final int GET_BROKER_CLUSTER_INFO = 106; public static final int UPDATE_AND_CREATE_SUBSCRIPTIONGROUP = 200; public static final int GET_ALL_SUBSCRIPTIONGROUP_CONFIG = 201; public static final int GET_TOPIC_STATS_INFO = 202; public static final int GET_CONSUMER_CONNECTION_LIST = 203; public static final int GET_PRODUCER_CONNECTION_LIST = 204; public static final int WIPE_WRITE_PERM_OF_BROKER = 205; // 從Name Server獲取完整Topic列表 public static final int GET_ALL_TOPIC_LIST_FROM_NAMESERVER = 206; // 從Broker刪除訂閱組 public static final int DELETE_SUBSCRIPTIONGROUP = 207; // 從Broker獲取消費狀態(進度) public static final int GET_CONSUME_STATS = 208; // Suspend Consumer消費過程 public static final int SUSPEND_CONSUMER = 209; // Resume Consumer消費過程 public static final int RESUME_CONSUMER = 210; // 重置Consumer Offset public static final int RESET_CONSUMER_OFFSET_IN_CONSUMER = 211; // 重置Consumer Offset public static final int RESET_CONSUMER_OFFSET_IN_BROKER = 212; // 調整Consumer執行緒池數量 public static final int ADJUST_CONSUMER_THREAD_POOL = 213; // 查詢訊息被哪些消費組消費 public static final int WHO_CONSUME_THE_MESSAGE = 214; // 從Broker刪除Topic配置 public static final int DELETE_TOPIC_IN_BROKER = 215; // 從Namesrv刪除Topic配置 public static final int DELETE_TOPIC_IN_NAMESRV = 216; // Namesrv 通過 project 獲取所有的 server ip 資訊 public static final int GET_KV_CONFIG_BY_VALUE = 217; // Namesrv 刪除指定 project group 下的所有 server ip 資訊 public static final int DELETE_KV_CONFIG_BY_VALUE = 218; // 通過NameSpace獲取所有的KV List public static final int GET_KVLIST_BY_NAMESPACE = 219; // offset 重置 public static final int RESET_CONSUMER_CLIENT_OFFSET = 220; // 客戶端訂閱訊息 public static final int GET_CONSUMER_STATUS_FROM_CLIENT = 221; // 通知 broker 呼叫 offset 重置處理 public static final int INVOKE_BROKER_TO_RESET_OFFSET = 222; // 通知 broker 呼叫客戶端訂閱訊息處理 public static final int INVOKE_BROKER_TO_GET_CONSUMER_STATUS = 223; // Broker 查詢topic被誰消費 // 2014-03-21 Add By shijia public static final int QUERY_TOPIC_CONSUME_BY_WHO = 300; // 獲取指定叢集下的所有 topic // 2014-03-26 public static final int GET_TOPICS_BY_CLUSTER = 224; // 向Broker註冊Filter Server // 2014-04-06 Add By shijia public static final int REGISTER_FILTER_SERVER = 301; // 向Filter Server註冊Class // 2014-04-06 Add By shijia public static final int REGISTER_MESSAGE_FILTER_CLASS = 302; // 根據 topic 和 group 獲取訊息的時間跨度 public static final int QUERY_CONSUME_TIME_SPAN = 303; // 獲取所有系統內建 Topic 列表 public static final int GET_SYSTEM_TOPIC_LIST_FROM_NS = 304; public static final int GET_SYSTEM_TOPIC_LIST_FROM_BROKER = 305; // 清理失效佇列 public static final int CLEAN_EXPIRED_CONSUMEQUEUE = 306; // 通過Broker查詢Consumer記憶體資料 // 2014-07-19 Add By shijia public static final int GET_CONSUMER_RUNNING_INFO = 307; // 查詢被修正 offset (轉發元件) public static final int QUERY_CORRECTION_OFFSET = 308; // 通過Broker直接向某個Consumer傳送一條訊息,並立刻消費,返回結果給broker,再返回給呼叫方 // 2014-08-11 Add By shijia public static final int CONSUME_MESSAGE_DIRECTLY = 309; // Broker 傳送訊息,優化網路資料包 public static final int SEND_MESSAGE_V2 = 310; // 單元化相關 topic public static final int GET_UNIT_TOPIC_LIST = 311; // 獲取含有單元化訂閱組的 Topic 列表 public static final int GET_HAS_UNIT_SUB_TOPIC_LIST = 312; // 獲取含有單元化訂閱組的非單元化 Topic 列表 public static final int GET_HAS_UNIT_SUB_UNUNIT_TOPIC_LIST = 313; // 克隆某一個組的消費進度到新的組 public static final int CLONE_GROUP_OFFSET = 314; // 檢視Broker上的各種統計資訊 public static final int VIEW_BROKER_STATS_DATA = 315; public static final int CLEAN_UNUSED_TOPIC = 316; public static final int GET_BROKER_CONSUME_STATS = 317; /** * update the config of name server */ public static final int UPDATE_NAMESRV_CONFIG = 318; /** * get config from name server */ public static final int GET_NAMESRV_CONFIG = 319; public static final int SEND_BATCH_MESSAGE = 320; public static final int QUERY_CONSUME_QUEUE = 321;