Class StartingPosition
The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
Inheritance
System.Object
StartingPosition
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.AWS.Lambda.dll
Syntax (csharp)
public sealed class StartingPosition : Enum
Syntax (vb)
Public NotInheritable Class StartingPosition
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.SecretsManager;
using Amazon.CDK.AWS.Lambda.EventSources;
// The secret that allows access to your self hosted Kafka cluster
Secret secret;
Function myFunction;
// The list of Kafka brokers
var bootstrapServers = new [] { "kafka-broker:9092" };
// The Kafka topic you want to subscribe to
var topic = "some-cool-topic";
myFunction.AddEventSource(new SelfManagedKafkaEventSource(new SelfManagedKafkaEventSourceProps {
BootstrapServers = bootstrapServers,
Topic = topic,
Secret = secret,
BatchSize = 100, // default
StartingPosition = StartingPosition.TRIM_HORIZON
}));
Synopsis
Fields
LATEST | Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard. |
TRIM_HORIZON | Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard. |
value__ |
Fields
LATEST
Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.
public const StartingPosition LATEST
Field Value
Type | Description |
---|---|
StartingPosition |
TRIM_HORIZON
Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.
public const StartingPosition TRIM_HORIZON
Field Value
Type | Description |
---|---|
StartingPosition |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |