<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # CommitFailedExceptionn * i.e. Consumer 客戶端在提交 offset 時出現了錯誤或異常,而且是不可恢復的嚴重異常。 注釋 > Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. This means that the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time message processing. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll() with max.poll.records. 問題 * 由于開啟 Rebalance,本實例將要提交 offset 的分區分配給了其他 Instance * 出現問題的原因:消費者實例連續兩次調用 poll 時間間隔過長 * 通常表明,Consumer Instance 花費太長時間進行消息處理 解決辦法 * 增加期望的時間間隔 `max.poll.interval.ms` * 減少 poll 方法一次性返回的消息數量,i.e. max.poll.records ## 異常拋出場景 * 手動提交 offset 時,i.e. 顯式調用 KafkaConsumer.commitSync() ### 場景一 * 消息處理的總時間超過預設的 `max.poll.interval.ms` ``` … Properties props = new Properties(); … props.put("max.poll.interval.ms", 5000); consumer.subscribe(Arrays.asList("test-topic")); while (true) { ConsumerRecords<String, String> records = consumer.poll(Duration.ofSeconds(1)); // 使用Thread.sleep模擬真實的消息處理邏輯 Thread.sleep(6000L); consumer.commitSync(); } ``` 解決方法 * 簡化消息處理邏輯 * 縮短單條消息處理時間 * 增加 Consumer 端允許下游系統消費一批消息的最大時長 * i.e. max.poll.interval.ms * 減少下游系統一次性消費的消息總數 * i.e. max.poll.records * 下游系統使用多線程加速消費 * 多線程間如何處理 offset 提交有難度 ### 場景二 * 如果應用中同時出現了相同 GroupID 的消費者組和 Standalone Consumer * 當獨立消費者手動提交 offset 時,會拋出此異常
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看