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 7086e750fa6c22337af2b254dc096d9e7b0b34ad
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Mon Aug 3 19:45:43 2020 +0200

    Camel-AWS2-MSK: Added deleteCluster example
---
 .../src/main/docs/aws2-msk-component.adoc          | 27 +++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc 
b/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
index 121a363..213ab81 100644
--- a/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
+++ b/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
@@ -159,7 +159,7 @@ from("direct:listClusters")
     .to("aws2-msk://test?mskClient=#amazonMskClient&operation=listClusters")
 
--------------------------------------------------------------------------------
 
-- createBroker: this operation will create an MSK Cluster in AWS
+- createCluster: this operation will create an MSK Cluster in AWS
 
 [source,java]
 
--------------------------------------------------------------------------------
@@ -177,6 +177,31 @@ from("direct:createCluster")
     .to("aws2-msk://test?mskClient=#amazonMskClient&operation=createCluster")
 
--------------------------------------------------------------------------------
 
+- deleteCluster: this operation will delete an MSK Cluster in AWS
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:deleteCluster")
+    .setHeader(MSK2Constants.CLUSTER_ARN, constant("test-kafka"));
+    .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster")
+--------------------------------------------------------------------------------
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:createCluster")
+    .process(new Processor() {
+       @Override
+       public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(MSK2Constants.CLUSTER_NAME, 
"test-kafka");
+                
exchange.getIn().setHeader(MSK2Constants.CLUSTER_KAFKA_VERSION, "2.1.1");
+                exchange.getIn().setHeader(MSK2Constants.BROKER_NODES_NUMBER, 
2);
+                BrokerNodeGroupInfo groupInfo = 
BrokerNodeGroupInfo.builder().build();
+                
exchange.getIn().setHeader(MSK2Constants.BROKER_NODES_GROUP_INFO, groupInfo);   
                               
+       }
+    })
+    .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster")
+--------------------------------------------------------------------------------
+
 == Automatic detection of KafkaClient client in registry
 
 The component is capable of detecting the presence of an KafkaClient bean into 
the registry.

Reply via email to