Interface KafkaEventSourceProps

All Superinterfaces:
BaseStreamEventSourceProps, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ManagedKafkaEventSourceProps, SelfManagedKafkaEventSourceProps
All Known Implementing Classes:
KafkaEventSourceProps.Jsii$Proxy, ManagedKafkaEventSourceProps.Jsii$Proxy, SelfManagedKafkaEventSourceProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.827Z") @Stability(Stable) public interface KafkaEventSourceProps extends software.amazon.jsii.JsiiSerializable, BaseStreamEventSourceProps
Properties for a Kafka event source.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lambda.*;
 import software.amazon.awscdk.services.lambda.eventsources.*;
 import software.amazon.awscdk.services.secretsmanager.*;
 import software.amazon.awscdk.core.*;
 Secret secret;
 KafkaEventSourceProps kafkaEventSourceProps = KafkaEventSourceProps.builder()
         .startingPosition(StartingPosition.TRIM_HORIZON)
         .topic("topic")
         // the properties below are optional
         .batchSize(123)
         .enabled(false)
         .maxBatchingWindow(Duration.minutes(30))
         .secret(secret)
         .build();
 
  • Method Details

    • getTopic

      @Stability(Stable) @NotNull String getTopic()
      The Kafka topic to subscribe to.
    • getSecret

      @Stability(Stable) @Nullable default ISecret getSecret()
      The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet.

      Default: none

    • builder

      @Stability(Stable) static KafkaEventSourceProps.Builder builder()
      Returns:
      a KafkaEventSourceProps.Builder of KafkaEventSourceProps