クラス AbstractRecoveringExceptionHandler<R>
java.lang.ObjectSE
org.springframework.kafka.streams.AbstractRecoveringExceptionHandler<R>
- 型パラメーター:
R- ハンドラー固有のレスポンス型
- 既知の直属サブクラス
RecoveringDeserializationExceptionHandler、RecoveringProcessingExceptionHandler、RecoveringProductionExceptionHandler
Kafka Streams 例外ハンドラーを復元するための抽象基底クラス。
- 導入:
- 4.1
- 作成者:
- Lo ï c Greffier
フィールド概要
フィールド修飾子と型フィールド説明protected final DeadLetterRecordManagerprotected @Nullable StringSEprotected @Nullable KafkaStreamsDeadLetterDestinationResolverprotected @Nullable ConsumerRecordRecovererコンストラクター概要
コンストラクター修飾子コンストラクター説明protectedprotected方法の概要
修飾子と型メソッド説明protected voidconfigureCommon(MapSE<StringSE, ?> configs, StringSE destinationResolverKey, StringSE recovererKey, @Nullable StringSE legacyRecovererKey) 共通属性を設定します。protected abstract Rfail()処理が失敗することを示すレスポンスを作成します。protected RhandleErrorCommon(org.apache.kafka.streams.errors.ErrorHandlerContext context, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, ExceptionSE exception, org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]> sourceRecord) 優先順位付けされた復旧戦略を用いてエラーを処理します。protected abstract R処理を再開すべきであることを示すレスポンスを作成します。
フィールドの詳細
deadLetterRecordManager
recoverer
destinationResolver
deadLetterTopic
コンストラクターの詳細
AbstractRecoveringExceptionHandler
protected AbstractRecoveringExceptionHandler()AbstractRecoveringExceptionHandler
方法の詳細
handleErrorCommon
protected R handleErrorCommon(org.apache.kafka.streams.errors.ErrorHandlerContext context, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, ExceptionSE exception, org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]> sourceRecord) 優先順位付けされた復旧戦略を用いてエラーを処理します。- ネイティブの Kafka Streams DLQ を介して
KafkaStreamsDeadLetterDestinationResolverによって解決されたトピックパーティションに転送することにより、ストリームを再開します。 - ネイティブの Kafka Streams DLQ を介して
errors.dead.letter.queue.topic.nameトピックに転送することで、ストリームを再開します。 - リカバリロジックとデッドレターレコードの送信を
ConsumerRecordRecovererに委譲します。デッドレターレコードはConsumerRecordRecovererによって処理されることが想定されているため、デッドレターレコードなしで処理を再開します。 - デッドレターレコードなしでストリームを失敗させる。
- パラメーター:
context- エラーハンドラーのコンテキストrecord- プロセッサーが準備した中間記録の型exception- 発生した例外sourceRecord- サブトポロジーの入力時の非直列化されたソース生レコード- 戻り値:
- a handler-specific response
- ネイティブの Kafka Streams DLQ を介して
configureCommon
protected void configureCommon(MapSE<StringSE, ?> configs, StringSE destinationResolverKey, StringSE recovererKey, @Nullable StringSE legacyRecovererKey) 共通属性を設定します。- パラメーター:
configs- the configuration mapdestinationResolverKey- the property key for the native DLQ destination resolverrecovererKey- the property key for the recovererlegacyRecovererKey- the legacy property key for the recoverer, used as fallback if recovererKey is not defined
fail
処理が失敗することを示すレスポンスを作成します。- 戻り値:
- ハンドラー固有の失敗レスポンス
resume
protected abstract R resume(ListSE<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> deadLetterRecords) 処理を再開すべきであることを示すレスポンスを作成します。- パラメーター:
deadLetterRecords- DLQ に転送する未配達郵便物記録のリスト- 戻り値:
- 担当者固有の履歴書への回答