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

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


The following commit(s) were added to refs/heads/main by this push:
     new f202e3fc Remove example
f202e3fc is described below

commit f202e3fc71407150c122267f06b54fb1fb080890
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Dec 3 09:48:18 2026 +0100

    Remove example
---
 README.adoc                                        |   4 +-
 couchbase-log/README.adoc                          |  50 --------
 couchbase-log/pom.xml                              | 110 ----------------
 .../org/apache/camel/example/MyApplication.java    |  36 ------
 .../org/apache/camel/example/MyRouteBuilder.java   |  30 -----
 .../src/main/resources/application.properties      |  28 ----
 couchbase-log/src/main/resources/log4j2.properties |  23 ----
 .../org/apache/camel/example/CouchbaseTest.java    | 142 ---------------------
 pom.xml                                            |   1 -
 9 files changed, 1 insertion(+), 423 deletions(-)

diff --git a/README.adoc b/README.adoc
index 7980e5c3..4a11ff15 100644
--- a/README.adoc
+++ b/README.adoc
@@ -40,7 +40,7 @@ readme's instructions.
 == Examples
 
 // examples: START
-Number of Examples: 73 (0 deprecated)
+Number of Examples: 72 (0 deprecated)
 
 [width="100%",cols="4,2,4",options="header"]
 |===
@@ -118,8 +118,6 @@ Number of Examples: 73 (0 deprecated)
 
 | link:cassandra-kubernetes/README.adoc[Cassandra Kubernetes] 
(cassandra-kubernetes) | Database | An example with Camel and Cassandra running 
on Kubernetes
 
-| link:couchbase-log/README.adoc[Couchbase Log] (couchbase-log) | Database | 
An example for showing standalone Camel with Couchbase
-
 | link:debezium-eventhubs-blob/README.adoc[Debezium Eventhubs Blob] 
(debezium-eventhubs-blob) | Database | An example for Debezium Component with 
Azure Event Hubs and Azure Storage Blob
 
 | link:jdbc/README.adoc[JDBC] (jdbc) | Database | An example for showing Camel 
using JDBC component
diff --git a/couchbase-log/README.adoc b/couchbase-log/README.adoc
deleted file mode 100644
index 621e9e74..00000000
--- a/couchbase-log/README.adoc
+++ /dev/null
@@ -1,50 +0,0 @@
-== Camel Main Example Couchbase
-
-This example shows how to use the Camel Main module
-to define a route from Couchbase to Log.
-
-Set your `application.properties` options correctly.
-You'll need also a running Couchbase server.
-
-=== Setting up the Couchbase Container
-
-First run the container
-
-[source,sh]
-----
-docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 couchbase:7.0.3
-----
-
-Now go to `localhost:8091` and create a new cluster with username/password 
admin/password
-
-Use the sample bucket beer-sample to populate the bucket.
-
-=== Build
-
-You will need to compile this example first:
-
-[source,sh]
-----
-$ mvn compile
-----
-
-Now you're ready to run the example.
-
-=== How to run
-
-You can run this example using
-
-[source,sh]
-----
-$ mvn camel:run
-----
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/couchbase-log/pom.xml b/couchbase-log/pom.xml
deleted file mode 100644
index 2ddc0810..00000000
--- a/couchbase-log/pom.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-      <groupId>org.apache.camel.example</groupId>
-      <artifactId>camel-examples</artifactId>
-      <version>4.25.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>camel-example-main-couchbase</artifactId>
-    <packaging>jar</packaging>
-    <name>Camel :: Example :: Couchbase</name>
-    <description>An example for showing standalone Camel with 
Couchbase</description>
-
-    <properties>
-        <category>Database</category>
-    </properties>
-
-    <dependencyManagement>
-        <dependencies>
-            <!-- Add Camel BOM -->
-            <dependency>
-                <groupId>org.apache.camel</groupId>
-                <artifactId>camel-bom</artifactId>
-                <version>${camel.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-main</artifactId>
-        </dependency>
-        <!-- we use these 2 camel components in this example -->
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-log</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-couchbase</artifactId>
-        </dependency>
-
-        <!-- logging -->
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <version>${log4j2-version}</version>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j2-impl</artifactId>
-            <version>${log4j2-version}</version>
-            <scope>runtime</scope>
-        </dependency>
-        <!-- for testing -->
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-main-junit6</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-infra-couchbase</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <!-- to run the application -->
-            <plugin>
-                <groupId>org.apache.camel</groupId>
-                <artifactId>camel-maven-plugin</artifactId>
-                <version>${camel.version}</version>
-                <configuration>
-                    
<mainClass>org.apache.camel.example.MyApplication</mainClass>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git 
a/couchbase-log/src/main/java/org/apache/camel/example/MyApplication.java 
b/couchbase-log/src/main/java/org/apache/camel/example/MyApplication.java
deleted file mode 100644
index 31197dc0..00000000
--- a/couchbase-log/src/main/java/org/apache/camel/example/MyApplication.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.example;
-
-import org.apache.camel.main.Main;
-
-/**
- * Main class that boot the Camel application
- */
-public final class MyApplication {
-
-    private MyApplication() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        // use Camels Main class
-        Main main = new Main(MyApplication.class);
-        // now keep the application running until the JVM is terminated (ctrl 
+ c or sigterm)
-        main.run(args);
-    }
-
-}
diff --git 
a/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java 
b/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java
deleted file mode 100644
index 19c4268e..00000000
--- a/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.example;
-
-import org.apache.camel.builder.RouteBuilder;
-
-public class MyRouteBuilder extends RouteBuilder {
-
-    @Override
-    public void configure() throws Exception {
-
-        
from("couchbase:http://{{couchbase.host}}:{{couchbase.port}}?bucket={{couchbase.bucket}}&username={{couchbase.username}}&password={{couchbase.password}}&consumerProcessedStrategy={{couchbase.consumerProcessedStrategy}}&connectionString={{couchbase.connectionString}}";)
-          .to("log:info");
-
-    }
-}
diff --git a/couchbase-log/src/main/resources/application.properties 
b/couchbase-log/src/main/resources/application.properties
deleted file mode 100644
index dd6f965b..00000000
--- a/couchbase-log/src/main/resources/application.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-##      http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-# here you can configure options on camel main
-# https://camel.apache.org/components/next/others/main.html
-camel.main.name = LogCouchbase
-
-couchbase.host=localhost
-couchbase.port=8091
-couchbase.connectionString=couchbase://localhost:11210
-couchbase.username=admin
-couchbase.password=password
-couchbase.bucket=beer-sample
-couchbase.consumerProcessedStrategy=delete
diff --git a/couchbase-log/src/main/resources/log4j2.properties 
b/couchbase-log/src/main/resources/log4j2.properties
deleted file mode 100644
index d9f0508a..00000000
--- a/couchbase-log/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-##      http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = out
diff --git 
a/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java 
b/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java
deleted file mode 100644
index 82fa9775..00000000
--- a/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.example;
-
-import java.time.Duration;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import com.couchbase.client.java.Bucket;
-import com.couchbase.client.java.Cluster;
-import com.couchbase.client.java.json.JsonObject;
-import com.couchbase.client.java.manager.bucket.BucketSettings;
-import com.couchbase.client.java.manager.bucket.BucketType;
-import com.couchbase.client.java.manager.query.CreatePrimaryQueryIndexOptions;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.main.MainConfigurationProperties;
-import org.apache.camel.test.infra.couchbase.services.CouchbaseService;
-import org.apache.camel.test.infra.couchbase.services.CouchbaseServiceFactory;
-import org.apache.camel.test.junit6.CamelContextConfiguration;
-import org.apache.camel.test.main.junit6.CamelMainTestSupport;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.camel.util.PropertiesHelper.asProperties;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that Camel consume data from Couchbase.
- */
-class CouchbaseTest extends CamelMainTestSupport {
-
-    private static final Logger LOG = 
LoggerFactory.getLogger(CouchbaseTest.class);
-
-    private static final String BUCKET = "test-bucket-" + 
System.currentTimeMillis();
-
-    @RegisterExtension
-    private static final CouchbaseService SERVICE = 
CouchbaseServiceFactory.createService();
-    private static Cluster CLUSTER;
-
-    @BeforeAll
-    static void init() {
-        CLUSTER = Cluster.connect(
-            SERVICE.getConnectionString(), SERVICE.username(), 
SERVICE.password()
-        );
-        CLUSTER.waitUntilReady(Duration.ofSeconds(30));
-        CLUSTER.buckets().createBucket(
-                
BucketSettings.create(BUCKET).bucketType(BucketType.COUCHBASE).flushEnabled(true));
-        CLUSTER.bucket(BUCKET).waitUntilReady(Duration.ofSeconds(30));
-        // Create a primary index so the SQL++ consumer can query the bucket.
-        // Retry because the query service may need extra time to become 
reachable
-        // after the KV bucket is ready (Couchbase initialises services in 
parallel,
-        // and Testcontainers' external-port remapping may not yet be 
reflected in
-        // the SDK's cluster topology on the first attempt).
-        createPrimaryIndexWithRetry(SERVICE.getConnectionString(), 
SERVICE.username(), SERVICE.password());
-    }
-
-    /**
-     * Creates a primary index on {@link #BUCKET}, retrying with fresh cluster 
connections until the query service is
-     * reachable or the maximum number of attempts is exhausted.
-     */
-    private static void createPrimaryIndexWithRetry(String connectionString, 
String username, String password) {
-        int maxAttempts = 10;
-        for (int attempt = 1; attempt <= maxAttempts; attempt++) {
-            // Use a short-lived cluster per attempt so we always get a fresh 
topology snapshot.
-            try (Cluster c = Cluster.connect(connectionString, username, 
password)) {
-                c.queryIndexes().createPrimaryIndex(BUCKET,
-                        
CreatePrimaryQueryIndexOptions.createPrimaryQueryIndexOptions().ignoreIfExists(true));
-                return;
-            } catch (Exception e) {
-                if (attempt == maxAttempts) {
-                    throw new RuntimeException("Failed to create primary index 
after " + maxAttempts + " attempts", e);
-                }
-                LOG.info("Query service not yet available (attempt {}/{}), 
retrying in 3s: {}",
-                        attempt, maxAttempts, e.getMessage());
-                try {
-                    Thread.sleep(3000);
-                } catch (InterruptedException ie) {
-                    Thread.currentThread().interrupt();
-                    throw new RuntimeException("Interrupted while waiting for 
query service", ie);
-                }
-            }
-        }
-    }
-
-    @AfterAll
-    static void destroy() {
-        if (CLUSTER != null) {
-            CLUSTER.buckets().dropBucket(BUCKET);
-            CLUSTER.disconnect();
-        }
-    }
-
-    @Override
-    public void configureContext(CamelContextConfiguration 
camelContextConfiguration) {
-        super.configureContext(camelContextConfiguration);
-        Properties overridenProperties = asProperties(
-                "couchbase.connectionString", SERVICE.getConnectionString(),
-                "couchbase.host", SERVICE.hostname(),
-                "couchbase.port", Integer.toString(SERVICE.port()),
-                "couchbase.username", SERVICE.username(),
-                "couchbase.password", SERVICE.password(),
-                "couchbase.bucket", BUCKET);
-        
camelContextConfiguration.withUseOverridePropertiesWithPropertiesComponent(overridenProperties);
-    }
-
-    @Test
-    void should_consume_bucket() {
-        Bucket bucket = CLUSTER.bucket(BUCKET);
-        bucket.waitUntilReady(Duration.ofSeconds(10L));
-        for (int i = 0; i < 10; i++) {
-            bucket.defaultCollection().upsert("my-doc-" + i, 
JsonObject.create().put("name", "My Name " + i));
-        }
-
-        NotifyBuilder notify = new 
NotifyBuilder(context).whenCompleted(10).wereSentTo("log:info").create();
-        assertTrue(
-            notify.matches(20, TimeUnit.SECONDS), "10 messages should be 
completed"
-        );
-    }
-
-    @Override
-    protected void configure(MainConfigurationProperties configuration) {
-        configuration.addRoutesBuilder(MyRouteBuilder.class);
-    }
-}
diff --git a/pom.xml b/pom.xml
index ff7b91d1..fe227ce0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,6 @@
         <module>cafe-endpointdsl</module>
         <module>cassandra-kubernetes</module>
         <module>console</module>
-        <module>couchbase-log</module>
         <module>debezium-eventhubs-blob</module>
         <module>flight-recorder</module>
         <module>ftp</module>

Reply via email to