1
私はカフカのトピックからメッセージを読むためにSpring Kafkaコンシューマを使用しています。私はこれらをOracle DBに残しています。 DB接続エラーが発生したときはいつでも、再試行したいと思います。Spring JDBCを使用してOracle DBに接続しています.JDBC接続の問題のみを再試行する必要がある場合に追加する必要がある例外クラスのリストは何ですか?Spring JDBC - カフカのコンシューマに対するリトライブル例外
private static Map<Class<? extends Throwable>, Boolean> retryableExceptions;
static{
retryableExceptions = new HashMap<>();
retryableExceptions.put(Exception.class, true);
}
protected RetryPolicy retryPolicy() {
SimpleRetryPolicy policy = new SimpleRetryPolicy(maxRetryAttempts, retryableExceptions);
return policy;
}
ありがとうもう一度Artem! –