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

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


The following commit(s) were added to refs/heads/main by this push:
     new 6c5cd626966 Camel-Aws2-SNS: Docs for Batching Support (#17578)
6c5cd626966 is described below

commit 6c5cd62696653433a0954c358f54ccf29b137705
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Mar 26 10:29:05 2025 +0100

    Camel-Aws2-SNS: Docs for Batching Support (#17578)
    
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../src/main/docs/aws2-sns-component.adoc          | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git 
a/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc 
b/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
index 3c303969d34..3123fdb9ca4 100644
--- a/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
+++ b/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
@@ -188,6 +188,39 @@ from("direct:start")
   
.to("aws2-sns://camel-topic?subject=The+subject+message&autoCreateTopic=true");
 
--------------------------------------------------------------------------------
 
+Sending batch to a topic
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+     .process(new Processor() {
+        @Override
+        public void process(Exchange exchange) throws Exception {
+          PublishBatchRequestEntry publishBatchRequestEntry1 = 
PublishBatchRequestEntry.builder()
+               .id("message1")
+               .message("This is message 1")
+               .build();
+
+          PublishBatchRequestEntry publishBatchRequestEntry2 = 
PublishBatchRequestEntry.builder()
+               .id("message2")
+               .message("This is message 2")
+               .build();
+
+          PublishBatchRequestEntry publishBatchRequestEntry3 = 
PublishBatchRequestEntry.builder()
+               .id("message3")
+               .message("This is message 3")
+               .build();
+
+          List<PublishBatchRequestEntry> pubList = new ArrayList<>();
+          pubList.add(publishBatchRequestEntry1);
+          pubList.add(publishBatchRequestEntry2);
+          pubList.add(publishBatchRequestEntry3);
+          exchange.getIn().setBody(pubList);
+          }
+  })
+  
.to("aws2-sns://camel-topic?subject=The+subject+message&autoCreateTopic=true&batchEnabled=true");
+--------------------------------------------------------------------------------
+
 == Dependencies
 
 Maven users will need to add the following dependency to their pom.xml.

Reply via email to