インターフェース KafkaInboundEndpoint
- すべての既知の実装クラス:
KafkaInboundGateway,KafkaMessageDrivenChannelAdapter
public interface KafkaInboundEndpoint
このインターフェースの実装では、通常、受信配信を再試行するための再試行テンプレートがサポートされ、再試行コンテキストへの共通属性の追加がサポートされます。
- 導入:
- 6.0
- 作成者:
- Gary Russell, Artem Bilan
ネストされたクラスの要約
ネストされたクラスフィールドのサマリー
フィールド修飾子と型フィールド説明static final ThreadLocalSE<@Nullable AttributeAccessor> static final StringSEリスナーが確認応答を実行できる場合の確認応答のKafkaInboundEndpoint.RetryContext属性キー。static final StringSEリスナーがコンシューマー対応の場合のコンシューマーのKafkaInboundEndpoint.RetryContext属性キー。static final StringSEレコードのKafkaInboundEndpoint.RetryContext属性キー。メソッドのサマリー
修飾子と型メソッド説明default voiddoWithRetry(RetryTemplate template, @Nullable RecoveryCallback<?> callback, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, @Nullable org.springframework.kafka.support.Acknowledgment acknowledgment, @Nullable org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, RunnableSE runnable) 再試行テンプレートと回復コールバックを使用してランナブルを実行します。
フィールドの詳細
CONTEXT_ACKNOWLEDGMENT
リスナーが確認応答を実行できる場合の確認応答のKafkaInboundEndpoint.RetryContext属性キー。- 関連事項:
CONTEXT_CONSUMER
リスナーがコンシューマー対応の場合のコンシューマーのKafkaInboundEndpoint.RetryContext属性キー。- 関連事項:
CONTEXT_RECORD
ATTRIBUTES_HOLDER
メソッドの詳細
doWithRetry
default void doWithRetry(RetryTemplate template, @Nullable RecoveryCallback<?> callback, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, @Nullable org.springframework.kafka.support.Acknowledgment acknowledgment, @Nullable org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, RunnableSE runnable) 再試行テンプレートと回復コールバックを使用してランナブルを実行します。- パラメーター:
template- テンプレート。callback- コールバック。record- レコード (またはレコード)。acknowledgment- 承認。consumer- コンシューマー。runnable- ランナブル。