Interface KclEndpoint

All Known Subinterfaces:
KclHandlerMethodEndpoint
All Known Implementing Classes:
KclListenerEndpoint

public interface KclEndpoint
Represents a Kinesis stream from which records can be consumed by a MessageListenerContainer.

Implementations describe what to consume and which per-listener overrides to apply, while a MessageListenerContainerFactory decides how the container is created. Attributes returning null leave the corresponding KclContainerOptions value configured on the factory untouched.

Since:
4.3.0
Author:
Matej Nedic
  • Method Details

    • getId

      String getId()
      The id of the container that will handle this endpoint.
      Returns:
      the container id.
    • getStreamNames

      Collection<String> getStreamNames()
      The Kinesis streams to consume from, never empty. Several streams are consumed by one container under a single KCL application.
      Returns:
      the stream names.
    • getApplicationName

      String getApplicationName()
      The KCL application name used for lease coordination.
      Returns:
      the application name.
    • getFactoryBeanName

      @Nullable String getFactoryBeanName()
      The name of the factory bean that will process this endpoint.
      Returns:
      the factory bean name, or null to use the default factory.
    • getCheckpointMode

      @Nullable KclCheckpointMode getCheckpointMode()
      The checkpoint mode overriding the one configured on the factory.
      Returns:
      the checkpoint mode, or null to keep the factory value.
    • getCheckpointInterval

      default @Nullable Duration getCheckpointInterval()
      Returns:
      the checkpoint interval override, or null to inherit from the factory.
    • getCheckpointRecordCount

      default @Nullable Long getCheckpointRecordCount()
      Returns:
      the checkpoint record count override, or null to inherit from the factory.
    • getAutoStartup

      default @Nullable Boolean getAutoStartup()
      Returns:
      the auto-startup override, or null to inherit from the factory.
    • getListenerMode

      default @Nullable KclListenerMode getListenerMode()
      Whether the endpoint receives records one at a time or as a batch.
      Returns:
      the listener mode, or null to detect it from the listener method: a method with a Collection parameter that is not a header receives batches.
    • getRetrievalMode

      @Nullable RetrievalMode getRetrievalMode()
      The retrieval mode overriding the one configured on the factory.
      Returns:
      the retrieval mode, or null to keep the factory value.
    • getInitialPositionInStream

      @Nullable software.amazon.kinesis.common.InitialPositionInStream getInitialPositionInStream()
      The initial position overriding the one configured on the factory.
      Returns:
      the initial position, or null to keep the factory value.
    • getInitialPositionTimestamp

      default @Nullable Instant getInitialPositionTimestamp()
      Returns:
      the initial position timestamp override, or null to inherit from the factory.
    • getConsumerArn

      @Nullable String getConsumerArn()
      The ARN of the enhanced fan-out consumer to read this stream with.
      Returns:
      the consumer ARN, or null if none or a name is used instead.
    • getConsumerName

      @Nullable String getConsumerName()
      The name of the enhanced fan-out consumer to read this stream with.
      Returns:
      the consumer name, or null if none or an ARN is used instead.
    • getLeaseTableName

      @Nullable String getLeaseTableName()
      The DynamoDB lease table name for this endpoint.
      Returns:
      the lease table name, or null to keep the factory value.
    • getMetricsNamespace

      @Nullable String getMetricsNamespace()
      The CloudWatch namespace for the KCL metrics of this endpoint.
      Returns:
      the metrics namespace, or null to keep the factory value.
    • getReplyStream

      @Nullable String getReplyStream()
      The stream that return values of this endpoint are forwarded to.
      Returns:
      the reply stream, or null if return values are not forwarded.