Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ service.
AWS2 Kinesis component also supports Synchronous and Asynchronous Client which means you choose what fits best your requirements,
so if you need the connection (client) to be async there's a property of 'asyncClient' (in DSL also can be found) needs to be turned true.


Prerequisites

You must have a valid Amazon Web Services developer account, and be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,19 @@ private String getShardIterator(final Shard shard) throws ExecutionException, In
}

resume(request);
GetShardIteratorResponse result = getClient().getShardIterator(request.build());

GetShardIteratorResponse result = null;
if (getEndpoint().getConfiguration().isAsyncClient()) {
try {
result = getAsyncClient()
.getShardIterator(request.build())
.get();
} catch (ExecutionException | InterruptedException e) {
throw new RuntimeException(e);
}
} else {
result = getClient().getShardIterator(request.build());
}

return result.shardIterator();
}
Expand Down