You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/09/04 13:14:13 UTC

[GitHub] [nifi] sdairs opened a new pull request #5367: NIFI-8087 Adds MessageGroupID and MessageDuplicationId to PutSNS

sdairs opened a new pull request #5367:
URL: https://github.com/apache/nifi/pull/5367


   https://issues.apache.org/jira/browse/NIFI-8087
   
   Adds MessageGroupID and MessageDuplicationID properties to PutSNS to support SNS FIFO topics


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] asfgit closed pull request #5367: NIFI-8087 Adds MessageGroupID and MessageDuplicationId to PutSNS

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #5367:
URL: https://github.com/apache/nifi/pull/5367


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] sdairs commented on a change in pull request #5367: NIFI-8087 Adds MessageGroupID and MessageDuplicationId to PutSNS

Posted by GitBox <gi...@apache.org>.
sdairs commented on a change in pull request #5367:
URL: https://github.com/apache/nifi/pull/5367#discussion_r702342707



##########
File path: nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sns/TestPutSNS.java
##########
@@ -89,6 +89,41 @@ public void testPublish() throws IOException {
         ff0.assertAttributeEquals(CoreAttributes.FILENAME.key(), "1.txt");
     }
 
+    @Test
+    public void testPublishFIFO() throws IOException {
+        runner.setProperty(PutSNS.CREDENTIALS_FILE, "src/test/resources/mock-aws-credentials.properties");
+        runner.setProperty(PutSNS.ARN, "arn:aws:sns:us-west-2:123456789012:test-topic-1.fifo");
+        runner.setProperty(PutSNS.SUBJECT, "${eval.subject}");
+        runner.setProperty(PutSNS.MESSAGEDEDUPLICATIONID, "${myuuid}");
+        runner.setProperty(PutSNS.MESSAGEGROUPID, "test1234");
+        assertTrue(runner.setProperty("DynamicProperty", "hello!").isValid());
+        final Map<String, String> ffAttributes = new HashMap<>();
+        ffAttributes.put("filename", "1.txt");
+        ffAttributes.put("eval.subject", "test-subject");
+        ffAttributes.put("myuuid", "fb0dfed8-092e-40ee-83ce-5b576cd26236");
+        runner.enqueue("Test Message Content", ffAttributes);
+
+        PublishResult mockPublishResult = new PublishResult();
+        Mockito.when(mockSNSClient.publish(Mockito.any(PublishRequest.class))).thenReturn(mockPublishResult);
+
+        runner.run();
+
+        ArgumentCaptor<PublishRequest> captureRequest = ArgumentCaptor.forClass(PublishRequest.class);
+        Mockito.verify(mockSNSClient, Mockito.times(1)).publish(captureRequest.capture());
+        PublishRequest request = captureRequest.getValue();
+        assertEquals("arn:aws:sns:us-west-2:123456789012:test-topic-1", request.getTopicArn());

Review comment:
       Forgot to update the topic name to match the .fifo suffix in assert




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] pvillard31 commented on pull request #5367: NIFI-8087 Adds MessageGroupID and MessageDuplicationId to PutSNS

Posted by GitBox <gi...@apache.org>.
pvillard31 commented on pull request #5367:
URL: https://github.com/apache/nifi/pull/5367#issuecomment-922274291


   Merged, thanks @sdairs 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org