@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.514Z") @Stability(value=Stable) public class SelfManagedKafkaEventSource extends StreamEventSource
Example:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.services.secretsmanager.Secret;
import software.amazon.awscdk.services.lambda.eventsources.SelfManagedKafkaEventSource;
// The secret that allows access to your self hosted Kafka cluster
Secret secret;
// (Optional) The secret containing the root CA certificate that your Kafka brokers use for TLS encryption
Secret encryption;
Function myFunction;
// The list of Kafka brokers
String[] bootstrapServers = List.of("kafka-broker:9092");
// The Kafka topic you want to subscribe to
String topic = "some-cool-topic";
// (Optional) The consumer group id to use when connecting to the Kafka broker. If omitted the UUID of the event source mapping will be used.
String consumerGroupId;
myFunction.addEventSource(SelfManagedKafkaEventSource.Builder.create()
.bootstrapServers(bootstrapServers)
.topic(topic)
.consumerGroupId(consumerGroupId)
.secret(secret)
.batchSize(100) // default
.startingPosition(StartingPosition.TRIM_HORIZON)
.encryption(encryption)
.build());
| Modifier and Type | Class and Description |
|---|---|
static class |
SelfManagedKafkaEventSource.Builder
A fluent builder for
SelfManagedKafkaEventSource. |
software.amazon.jsii.JsiiObject.InitializationModeIEventSource.Jsii$Default| Modifier | Constructor and Description |
|---|---|
protected |
SelfManagedKafkaEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SelfManagedKafkaEventSource(software.amazon.jsii.JsiiObjectRef objRef) |
|
SelfManagedKafkaEventSource(SelfManagedKafkaEventSourceProps props) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(IFunction target)
Called by `lambda.addEventSource` to allow the event source to bind to this function.
|
enrichMappingOptions, getPropsjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected SelfManagedKafkaEventSource(software.amazon.jsii.JsiiObjectRef objRef)
protected SelfManagedKafkaEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public SelfManagedKafkaEventSource(@NotNull
SelfManagedKafkaEventSourceProps props)
props - This parameter is required.@Stability(value=Stable)
public void bind(@NotNull
IFunction target)
bind in interface IEventSourcebind in class StreamEventSourcetarget - This parameter is required.Copyright © 2022. All rights reserved.