Skip to content

Commit 383171b

Browse files
authored
fix(lambda-event-sources): unsupported property onFailure for KafkaEventSources (#19995)
Closes #19917. Seems this was missed in a previous fix: #17965. Adding breaking changes to `allowed-breaking-changes.txt` because they never worked in the first place. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent fcf981b commit 383171b

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

allowed-breaking-changes.txt

+6
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,9 @@ removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled
130130
# changed the type of RDS's SnapshotCredentials.secret from Secret to ISecret,
131131
# shouldn't matter
132132
changed-type:@aws-cdk/aws-rds.SnapshotCredentials.secret
133+
134+
# removed property from kafka eventsources as they are not supported
135+
removed:@aws-cdk/aws-lambda-event-sources.BaseStreamEventSourceProps.onFailure
136+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.onFailure
137+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.onFailure
138+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.onFailure

packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as lambda from '@aws-cdk/aws-lambda';
22
import { Duration } from '@aws-cdk/core';
33

44
/**
5-
* The set of properties for event sources that follow the streaming model,
6-
* such as, Dynamo, Kinesis and Kafka.
5+
* The set of properties for streaming event sources shared by
6+
* Dynamo, Kinesis and Kafka.
77
*/
88
export interface BaseStreamEventSourceProps{
99
/**
@@ -21,13 +21,6 @@ export interface BaseStreamEventSourceProps{
2121
*/
2222
readonly batchSize?: number;
2323

24-
/**
25-
* An Amazon SQS queue or Amazon SNS topic destination for discarded records.
26-
*
27-
* @default discarded records are ignored
28-
*/
29-
readonly onFailure?: lambda.IEventSourceDlq;
30-
3124
/**
3225
* Where to begin consuming the stream.
3326
*/
@@ -50,8 +43,8 @@ export interface BaseStreamEventSourceProps{
5043
}
5144

5245
/**
53-
* The set of properties for event sources that follow the streaming model,
54-
* such as, Dynamo, Kinesis.
46+
* The set of properties for streaming event sources shared by
47+
* Dynamo and Kinesis.
5548
*/
5649
export interface StreamEventSourceProps extends BaseStreamEventSourceProps {
5750
/**
@@ -107,6 +100,13 @@ export interface StreamEventSourceProps extends BaseStreamEventSourceProps {
107100
* @default - None
108101
*/
109102
readonly tumblingWindow?: Duration;
103+
104+
/**
105+
* An Amazon SQS queue or Amazon SNS topic destination for discarded records.
106+
*
107+
* @default - discarded records are ignored
108+
*/
109+
readonly onFailure?: lambda.IEventSourceDlq;
110110
}
111111

112112
/**

0 commit comments

Comments
 (0)