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 2020/11/27 13:01:35 UTC

[camel] branch master updated (49a003a -> 6e710a0)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 49a003a  Regen
     new c67b009  Camel-AWS2-SNS: Guard check for Message Group Id Stategy and Message Deduplication Id Strategy
     new 6e710a0  Regen

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/component/aws2/sns/Sns2Producer.java      | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)


[camel] 01/02: Camel-AWS2-SNS: Guard check for Message Group Id Stategy and Message Deduplication Id Strategy

Posted by ac...@apache.org.
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 c67b009801bac2a260137f045a64d3db6c703fa0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 27 13:50:39 2020 +0100

    Camel-AWS2-SNS: Guard check for Message Group Id Stategy and Message Deduplication Id Strategy
---
 .../apache/camel/component/aws2/sns/Sns2Producer.java | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java
index 69b0142..af04570 100644
--- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java
+++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java
@@ -30,6 +30,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -136,14 +137,18 @@ public class Sns2Producer extends DefaultProducer {
     private void configureFifoAttributes(PublishRequest.Builder request, Exchange exchange) {
         if (getEndpoint().getConfiguration().isFifoTopic()) {
             // use strategies
-            MessageGroupIdStrategy messageGroupIdStrategy = getEndpoint().getConfiguration().getMessageGroupIdStrategy();
-            String messageGroupId = messageGroupIdStrategy.getMessageGroupId(exchange);
-            request.messageGroupId(messageGroupId);
-
-            MessageDeduplicationIdStrategy messageDeduplicationIdStrategy
+        	if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getMessageGroupIdStrategy())) {
+                MessageGroupIdStrategy messageGroupIdStrategy = getEndpoint().getConfiguration().getMessageGroupIdStrategy();
+                String messageGroupId = messageGroupIdStrategy.getMessageGroupId(exchange);
+                request.messageGroupId(messageGroupId);
+        	}
+
+        	if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy())) {
+                MessageDeduplicationIdStrategy messageDeduplicationIdStrategy
                     = getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy();
-            String messageDeduplicationId = messageDeduplicationIdStrategy.getMessageDeduplicationId(exchange);
-            request.messageDeduplicationId(messageDeduplicationId);
+                String messageDeduplicationId = messageDeduplicationIdStrategy.getMessageDeduplicationId(exchange);
+                request.messageDeduplicationId(messageDeduplicationId);
+        	}
 
         }
     }


[camel] 02/02: Regen

Posted by ac...@apache.org.
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 6e710a04f12dd93418995d392846928eeca92955
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 27 13:57:57 2020 +0100

    Regen
---
 .../java/org/apache/camel/component/aws2/sns/Sns2Producer.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java
index af04570..0309b32 100644
--- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java
+++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Producer.java
@@ -137,18 +137,18 @@ public class Sns2Producer extends DefaultProducer {
     private void configureFifoAttributes(PublishRequest.Builder request, Exchange exchange) {
         if (getEndpoint().getConfiguration().isFifoTopic()) {
             // use strategies
-        	if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getMessageGroupIdStrategy())) {
+            if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getMessageGroupIdStrategy())) {
                 MessageGroupIdStrategy messageGroupIdStrategy = getEndpoint().getConfiguration().getMessageGroupIdStrategy();
                 String messageGroupId = messageGroupIdStrategy.getMessageGroupId(exchange);
                 request.messageGroupId(messageGroupId);
-        	}
+            }
 
-        	if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy())) {
+            if (ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy())) {
                 MessageDeduplicationIdStrategy messageDeduplicationIdStrategy
-                    = getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy();
+                        = getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy();
                 String messageDeduplicationId = messageDeduplicationIdStrategy.getMessageDeduplicationId(exchange);
                 request.messageDeduplicationId(messageDeduplicationId);
-        	}
+            }
 
         }
     }