You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/01/19 13:20:29 UTC
[camel] 02/02: CAMEL-12161 - Camel-AWS DdbStream: Expose options to
avoid a required client in the registry
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit b221b718ffcea54e6a10301606d4c3bd317e004f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jan 19 14:19:46 2018 +0100
CAMEL-12161 - Camel-AWS DdbStream: Expose options to avoid a required client in the registry
---
.../camel/component/aws/ddbstream/DdbStreamEndpoint.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java
index 1108a25..3244385 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java
@@ -24,6 +24,7 @@ import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBStreams;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBStreamsClientBuilder;
import com.amazonaws.services.dynamodbv2.model.Record;
+import com.amazonaws.services.kinesis.AmazonKinesis;
import org.apache.camel.Consumer;
import org.apache.camel.Exchange;
@@ -76,10 +77,8 @@ public class DdbStreamEndpoint extends ScheduledPollEndpoint {
public void doStart() throws Exception {
super.doStart();
- if (configuration.getAmazonDynamoDbStreamsClient() == null) {
- ddbStreamClient = createDdbStreamClient();
- configuration.setAmazonDynamoDbStreamsClient(ddbStreamClient);
- }
+ ddbStreamClient = configuration.getAmazonDynamoDbStreamsClient() != null ? configuration.getAmazonDynamoDbStreamsClient()
+ : createDdbStreamClient();
}
@Override
@@ -90,6 +89,10 @@ public class DdbStreamEndpoint extends ScheduledPollEndpoint {
public DdbStreamConfiguration getConfiguration() {
return configuration;
}
+
+ public AmazonDynamoDBStreams getClient() {
+ return ddbStreamClient;
+ }
public String getSequenceNumber() {
switch (configuration.getIteratorType()) {
--
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.