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/03/20 07:15:59 UTC
[camel] 13/14: CAMEL-12379 - Shutdown only AWS clients owned by the
context - AWS SQS
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-2.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 54ab03a7b49df6c10ee7db91d1a6840a588625f6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 20 08:11:03 2018 +0100
CAMEL-12379 - Shutdown only AWS clients owned by the context - AWS SQS
---
.../main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java
index fda087e..1ab049b 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java
@@ -24,7 +24,6 @@ import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
@@ -221,8 +220,10 @@ public class SqsEndpoint extends ScheduledPollEndpoint implements HeaderFilterSt
@Override
public void doStop() throws Exception {
- if (client != null) {
- client.shutdown();
+ if (ObjectHelper.isEmpty(configuration.getAmazonSQSClient())) {
+ if (client != null) {
+ client.shutdown();
+ }
}
super.doStop();
}
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.