クラス BatchListenerFailedException

実装されたすべてのインターフェース:
SerializableSE

public class BatchListenerFailedException extends KafkaException
バッチ内のどのレコードが失敗したかをフレームワークに通知するために、ユーザーコードによってスローされる例外。
導入:
2.5
作成者:
Gary Russell, Wang Zhiyang
関連事項:
  • コンストラクターの詳細

    • BatchListenerFailedException

      public BatchListenerFailedException(StringSE message, int index)
      提供されたプロパティを使用してインスタンスを構築します。
      パラメーター:
      message - メッセージ。
      index - 失敗したレコードのバッチ内のインデックス。
    • BatchListenerFailedException

      public BatchListenerFailedException(StringSE message, @Nullable ThrowableSE cause, int index)
      提供されたプロパティを使用してインスタンスを構築します。
      パラメーター:
      message - メッセージ。
      cause - 原因。
      index - 失敗したレコードのバッチ内のインデックス。
    • BatchListenerFailedException

      public BatchListenerFailedException(StringSE message, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record)
      提供されたプロパティを使用してインスタンスを構築します。
      パラメーター:
      message - メッセージ。
      record - 失敗した記録。
    • BatchListenerFailedException

      public BatchListenerFailedException(StringSE message, @Nullable ThrowableSE cause, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record)
      提供されたプロパティを使用してインスタンスを構築します。
      パラメーター:
      message - メッセージ。
      cause - 原因。
      record - 失敗した記録。
  • メソッドの詳細

    • getRecord

      @Nullable public org.apache.kafka.clients.consumer.ConsumerRecord<?,?> getRecord()
      失敗したレコードを返します。
      戻り値:
      レコード。
    • getIndex

      public int getIndex()
      失敗したレコードのバッチでインデックスを返します。
      戻り値:
      インデックス。
    • getMessage

      public StringSE getMessage()
      オーバーライド:
      クラス ThrowableSEgetMessage