Skip to content

Commit

Permalink
Apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bracki committed Mar 16, 2021
1 parent a177e0d commit 6f451cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ export class SelfManagedKafkaEventSource extends StreamEventSource {
}

private mappingId(target: lambda.IFunction) {
const idHash = crypto.createHash('md5').update(JSON.stringify(Stack.of(target).resolve(this.innerProps.bootstrapServers))).digest('hex');
let hash = crypto.createHash('md5');
hash.update(JSON.stringify(Stack.of(target).resolve(this.innerProps.bootstrapServers)));
const idHash = hash.digest('hex');
return `KafkaEventSource:${idHash}:${this.innerProps.topic}`;
}

Expand Down

0 comments on commit 6f451cf

Please sign in to comment.