# priority problem ## 修改 ManagedJob - Producer(ManagedJob) 發送 RESTful API request 以下參數至 PriorityMonitor - `timestamp` - `topic name` - `priority value` - 新增 priority value 的 label ## 新增 PriorityMonitor CRD 1. PriorityMonitor 透過 RESTful API 接收來自 Producer 的以下參數作為 `2.` Algo 的 input data - `timestamp` - `topic name` - `priority value` 2. 以 `timestamp` 去做排序針對指定的 critical topic 去累計 input `priority value` 是否比前一筆`priority value` 還要大;若後者 priority 大於前者則 `count` 遞增,直到 coordinator 觸發 rebalance ,透過 RESTful API 去重置 `count=0` - 發送 RESTful API request - POST /status/{bool}/{region_id}/{priority_monitor_name}/{topic} ## 新增 Coordinator 功能 - create Job - 在 region_id 新增 Consumer 訂閱 topic 並同時取消原本的 Consumer 訂閱(zookeeper 查詢),進行 reoder 再將 message 送回原本的 topic。最後恢復原本的 Consumer 訂閱來達到 priority reoder 的解決辦法。 - 發送 RESTful API request - POST /reset/{region_id}/{priority_monitor_name} - 接收 RESTful API request,紀錄 json 參數: - ```json status: bool region_id: string priority_monitor_name: string topic: string ```