インターフェース KafkaListenerEndpoint

すべての既知の実装クラス:
AbstractKafkaListenerEndpointMethodKafkaListenerEndpointMultiMethodKafkaListenerEndpoint

public interface KafkaListenerEndpoint
Kafka リスナーエンドポイントのモデル。プログラムでエンドポイントを登録するために KafkaListenerConfigurer に対して使用できます。
作成者:
Stephane Nicoll, Gary Russell
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    Return the autoStartup for this endpoint's container.
    default BooleanSE
    このエンドポイントの現在のバッチリスナーフラグを返します。明示的に設定されていない場合は null を返します。
    コンテナーのクライアント ID プレフィックスを返します。並行性が使用される場合、一意の ID を提供するために "-n" が接尾辞として付けられます。
    このエンドポイントのコンテナーの同時実行性を返します。
    default PropertiesSE
    コンシューマーファクトリによって提供されるコンシューマープロパティとマージされるコンシューマープロパティを取得します。ここのプロパティは、コンシューマーファクトリの同じ名前のプロパティよりも優先されます。
    default ContainerPostProcessor<?,?,?>
    このエンドポイントの ContainerPostProcessor を返します。明示的に設定されていない場合は null を返します。
    このエンドポイントのグループを返すか、グループにない場合は null を返します。
    Return the groupId of this endpoint - if present, overrides the group.id property of the consumer factory.
    このエンドポイントの ID を返します。
    default byte[]
    レコードヘッダーに挿入するリスナー情報を取得します。
    default StringSE
    このコンテナーが再試行トピック用である場合は、メインリスナー ID を返します。
    Return the topicPartitions for this endpoint.
    Return the topicPattern for this endpoint.
    このエンドポイントのトピックを返します。
    boolean
    true の場合、IterableSE の戻り結果は個別のレコードに分割されます。
    void
    このエンドポイントで定義されたモデルを使用して、指定されたメッセージリスナーコンテナーをセットアップします。
  • メソッドの詳細

    • getId

      このエンドポイントの ID を返します。
      戻り値:
      このエンドポイントの ID。エンドポイントが実際のリスナーコンテナーに対して解決されるときに、ID をさらに修飾できます。
      関連事項:
    • getGroupId

      @Nullable StringSE getGroupId()
      Return the groupId of this endpoint - if present, overrides the group.id property of the consumer factory.
      戻り値:
      グループ ID。null の場合があります。
      導入:
      1.3
    • getGroup

      @Nullable StringSE getGroup()
      このエンドポイントのグループを返すか、グループにない場合は null を返します。
      戻り値:
      このエンドポイントのグループ、またはグループにない場合は null。
    • getTopics

      CollectionSE<StringSE> getTopics()
      このエンドポイントのトピックを返します。
      戻り値:
      このエンドポイントのトピック。
    • getTopicPartitionsToAssign

      @Nullable TopicPartitionOffset[] getTopicPartitionsToAssign()
      Return the topicPartitions for this endpoint.
      戻り値:
      the topicPartitions for this endpoint.
      導入:
      2.3
    • getTopicPattern

      @Nullable PatternSE getTopicPattern()
      Return the topicPattern for this endpoint.
      戻り値:
      the topicPattern for this endpoint.
    • getClientIdPrefix

      @Nullable StringSE getClientIdPrefix()
      コンテナーのクライアント ID プレフィックスを返します。並行性が使用される場合、一意の ID を提供するために "-n" が接尾辞として付けられます。
      戻り値:
      クライアント ID プレフィックス。
      導入:
      2.1.1
    • getConcurrency

      @Nullable IntegerSE getConcurrency()
      このエンドポイントのコンテナーの同時実行性を返します。
      戻り値:
      並行性。
      導入:
      2.2
    • getAutoStartup

      @Nullable BooleanSE getAutoStartup()
      Return the autoStartup for this endpoint's container.
      戻り値:
      autoStartup。
      導入:
      2.2
    • getConsumerProperties

      @Nullable default PropertiesSE getConsumerProperties()
      コンシューマーファクトリによって提供されるコンシューマープロパティとマージされるコンシューマープロパティを取得します。ここのプロパティは、コンシューマーファクトリの同じ名前のプロパティよりも優先されます。group.id および client.id は無視されます。
      戻り値:
      プロパティ。
      導入:
      2.1.4
      関連事項:
    • setupListenerContainer

      void setupListenerContainer(MessageListenerContainer listenerContainer, @Nullable MessageConverter messageConverter)
      このエンドポイントで定義されたモデルを使用して、指定されたメッセージリスナーコンテナーをセットアップします。

      このエンドポイントは、それを使用可能にするために、指定されたコンテナーのリクエストされた欠落オプションを提供する必要があります。通常、これは使用する queues および messageListener の設定に関するものですが、実装はすでに設定されているデフォルト設定をオーバーライドする場合があります。

      パラメーター:
      listenerContainer - 設定するリスナーコンテナー
      messageConverter - メッセージコンバーター - null でもかまいません
    • isSplitIterables

      boolean isSplitIterables()
      true の場合、IterableSE の戻り結果は個別のレコードに分割されます。
      戻り値:
      true に分割します。
      導入:
      2.3.5
    • getListenerInfo

      @Nullable default byte[] getListenerInfo()
      レコードヘッダーに挿入するリスナー情報を取得します。
      戻り値:
      情報。
      導入:
      2.8.4
    • getMainListenerId

      @Nullable default StringSE getMainListenerId()
      このコンテナーが再試行トピック用である場合は、メインリスナー ID を返します。
      戻り値:
      メインのリスナー ID または null。
      導入:
      3.0
    • getBatchListener

      @Nullable default BooleanSE getBatchListener()
      このエンドポイントの現在のバッチリスナーフラグを返します。明示的に設定されていない場合は null を返します。
      戻り値:
      バッチリスナーフラグ。
      導入:
      2.9.6
    • getContainerPostProcessor

      @Nullable default ContainerPostProcessor<?,?,?> getContainerPostProcessor()
      このエンドポイントの ContainerPostProcessor を返します。明示的に設定されていない場合は null を返します。
      戻り値:
      コンテナーのポストプロセッサー。
      導入:
      3.1