Skip to content

Commit

Permalink
Upgrade to AWS SDK 2.20.35
Browse files Browse the repository at this point in the history
* Simplify some code in the `KclMessageDrivenChannelAdapter`
* Tried to upgrade to LocalStack `2.0` - failed on S3 `createBucket`
with `Length Required` error.
Sounds like there was no LocalStack and AWS SDK integration testing
  • Loading branch information
artembilan committed Mar 31, 2023
1 parent ba61164 commit 75cd725
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repositories {
ext {
assertjVersion = '3.24.2'
awaitilityVersion = '4.2.0'
awsSdkVersion = '2.20.32'
awsSdkVersion = '2.20.35'
jacksonVersion = '2.14.2'
junitVersion = '5.9.2'
log4jVersion = '2.19.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import software.amazon.kinesis.processor.ShardRecordProcessor;
import software.amazon.kinesis.processor.ShardRecordProcessorFactory;
import software.amazon.kinesis.processor.SingleStreamTracker;
import software.amazon.kinesis.processor.StreamTracker;
import software.amazon.kinesis.retrieval.KinesisClientRecord;
import software.amazon.kinesis.retrieval.RetrievalConfig;

Expand Down Expand Up @@ -239,17 +240,23 @@ public void setBindSourceRecord(boolean bindSourceRecord) {
@Override
protected void onInit() {
super.onInit();
this.config =
new ConfigsBuilder(buildStreamTracker(),
this.consumerGroup,
this.kinesisClient,
this.dynamoDBClient,
this.cloudWatchClient,
this.workerId,
this.recordProcessorFactory);
}

private StreamTracker buildStreamTracker() {
if (this.streams.length == 1) {
this.config = new ConfigsBuilder(
new SingleStreamTracker(
StreamIdentifier.singleStreamInstance(this.streams[0]), this.streamInitialSequence),
this.consumerGroup, this.kinesisClient, this.dynamoDBClient, this.cloudWatchClient, this.workerId,
this.recordProcessorFactory);
return new SingleStreamTracker(StreamIdentifier.singleStreamInstance(this.streams[0]),
this.streamInitialSequence);
}
else {
this.config = new ConfigsBuilder(new StreamsTracker(), this.consumerGroup, this.kinesisClient,
this.dynamoDBClient, this.cloudWatchClient, this.workerId, this.recordProcessorFactory);
return new StreamsTracker();
}
}

Expand Down

0 comments on commit 75cd725

Please sign in to comment.