[ 
https://issues.apache.org/jira/browse/CAMEL-12641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16540232#comment-16540232
 ] 

ASF GitHub Bot commented on CAMEL-12641:
----------------------------------------

oscerd commented on a change in pull request #2421: CAMEL-12641 : Aws-sns and 
aws-sqs components not accepting Date type …
URL: https://github.com/apache/camel/pull/2421#discussion_r201730953
 
 

 ##########
 File path: 
components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java
 ##########
 @@ -56,33 +57,18 @@ public void process(Exchange exchange) throws Exception {
         SendMessageRequest request = new SendMessageRequest(getQueueUrl(), 
body);
         
request.setMessageAttributes(translateAttributes(exchange.getIn().getHeaders(), 
exchange));
         addDelay(request, exchange);
-        configureFifoAttributes(request, exchange);
 
         LOG.trace("Sending request [{}] from exchange [{}]...", request, 
exchange);
-
+        
         SendMessageResult result = getClient().sendMessage(request);
-
+        
         LOG.trace("Received result [{}]", result);
-
+        
         Message message = getMessageForResponse(exchange);
         message.setHeader(SqsConstants.MESSAGE_ID, result.getMessageId());
         message.setHeader(SqsConstants.MD5_OF_BODY, 
result.getMD5OfMessageBody());
     }
 
-    private void configureFifoAttributes(SendMessageRequest request, Exchange 
exchange) {
-        if (getEndpoint().getConfiguration().isFifoQueue()) {
-            // use strategies
-            MessageGroupIdStrategy messageGroupIdStrategy = 
getEndpoint().getConfiguration().getMessageGroupIdStrategy();
-            String messageGroupId = 
messageGroupIdStrategy.getMessageGroupId(exchange);
-            request.setMessageGroupId(messageGroupId);
-
-            MessageDeduplicationIdStrategy messageDeduplicationIdStrategy = 
getEndpoint().getConfiguration().getMessageDeduplicationIdStrategy();
-            String messageDeduplicationId = 
messageDeduplicationIdStrategy.getMessageDeduplicationId(exchange);
-            request.setMessageDeduplicationId(messageDeduplicationId);
-
-        }
-    }
-
     private void addDelay(SendMessageRequest request, Exchange exchange) {
 
 Review comment:
   Why are you removing this block?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Aws-sns and aws-sqs components not accepting Date type message attributes
> -------------------------------------------------------------------------
>
>                 Key: CAMEL-12641
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12641
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>    Affects Versions: 2.21.1
>            Reporter: Saravanakumar Selvaraj
>            Priority: Minor
>
> Camel aws-sns and aws-sqs components not accepting Date type message 
> attributes. For example, the camel route like,
> {{          <from id="_from1" uri="timer://foo?repeatCount=1" />}}
> {{          <to id="_to1"  uri="aws-sns://***/>}}
> fails with error while publishing the message.
> {{2018-07-11 18:49:49,109 [2 - timer://foo] WARN  SnsProducer                 
>    - Cannot put the message header key=firedTime, 
> value=2018-07-11T18:49:49.090+0530 into Sns MessageAttribute}}
>  
> Because it carries header _firedTime_ as java.util.Date



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to