This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 4d5676441 Fix #542: add a Couchbase source Kamelet (#3007)
4d5676441 is described below
commit 4d56764413927bb733095f3594ba3e51bba4d156
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Sep 7 09:48:58 2026 +0200
Fix #542: add a Couchbase source Kamelet (#3007)
The catalog had couchbase-sink but nothing on the consuming side, even
though camel-couchbase supports both. This adds the missing half.
The component polls a bucket in one of two modes and the Kamelet exposes
both: an N1QL statement, which is the default, or a MapReduce view selected
with designDocumentName and viewName when useView is true. Connection and
credential properties mirror couchbase-sink exactly, including the
connectionString escape hatch, so the pair reads the same way.
Marked Preview, no Citrus test: exercising it needs a live Couchbase and
there is no Couchbase container in the project's Citrus toolchain.
Verified with `camel run` against the real component -- the Couchbase SDK
initialises and begins bootstrapping from the configured host, the route
reports "Routes startup (total:1 started:1 kamelets:1)" and there are zero
unknown-option or endpoint-resolution errors; it then simply cannot reach a
cluster that is not there.
Claude-Session: https://claude.ai/code/session_01Tz352mt7yzGWLfvYTBo2Dk
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
---
docs/modules/ROOT/nav.adoc | 1 +
kamelets/couchbase-source.kamelet.yaml | 144 +++++++++++++++++++++
.../kamelets/couchbase-source.kamelet.yaml | 144 +++++++++++++++++++++
3 files changed, 289 insertions(+)
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index a2a7eb6ba..161bddc2e 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -60,6 +60,7 @@
* xref:chuck-norris-source.adoc[]
* xref:chunk-template-action.adoc[]
* xref:couchbase-sink.adoc[]
+* xref:couchbase-source.adoc[]
* xref:counter-source.adoc[]
* xref:cron-source.adoc[]
* xref:crypto-decrypt-action.adoc[]
diff --git a/kamelets/couchbase-source.kamelet.yaml
b/kamelets/couchbase-source.kamelet.yaml
new file mode 100644
index 000000000..8a80f28f6
--- /dev/null
+++ b/kamelets/couchbase-source.kamelet.yaml
@@ -0,0 +1,144 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+ name: couchbase-source
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "4.22.1-SNAPSHOT"
+ camel.apache.org/kamelet.icon:
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjguMzQzIDY4LjM0MyIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHVzZSB4bGluazpocmVmPSIjQSIgeD0iMi4xNzEiIHk9IjIuMTcxIi8+PHN5bWJvbCBpZD0iQSIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0zMi4wMDIgMEMxNC4zMzEuMDAyLjAwNSAxNC4zMjYgMC
[...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Couchbase"
+ camel.apache.org/kamelet.namespace: "Nosql"
+ labels:
+ camel.apache.org/kamelet.type: "source"
+spec:
+ definition:
+ title: "Couchbase Source"
+ description: |-
+ Poll a Couchbase bucket and emit the results.
+
+ By default the bucket is queried with the N1QL statement given in the
statement property. Set useView to true to poll a MapReduce view instead,
selected with designDocumentName and viewName.
+ required:
+ - protocol
+ - couchbaseHostname
+ - bucket
+ type: object
+ properties:
+ protocol:
+ title: Protocol
+ description: The protocol to use
+ type: string
+ couchbaseHostname:
+ title: Hostname
+ description: The hostname to use
+ type: string
+ couchbasePort:
+ title: Port
+ description: The port to use
+ type: integer
+ default: 8091
+ bucket:
+ title: Bucket
+ description: The bucket to use
+ type: string
+ username:
+ title: Username
+ description: Username to connect to Couchbase.
+ type: string
+ x-descriptors:
+ - urn:camel:group:credentials
+ password:
+ title: Password
+ description: Password to connect to Couchbase.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:camel:group:credentials
+ connectionString:
+ title: Connection String
+ description: The full Couchbase SDK connection string (e.g.
couchbase://host:port). When set, it takes precedence over hostname extraction
for the KV service port.
+ type: string
+ statement:
+ title: N1QL Statement
+ description: The N1QL query to run against the bucket on each poll.
Used unless useView is true.
+ type: string
+ example: "SELECT * FROM `travel-sample` LIMIT 10"
+ useView:
+ title: Use View
+ description: Poll a MapReduce view instead of running the N1QL
statement.
+ type: boolean
+ default: false
+ designDocumentName:
+ title: Design Document Name
+ description: The design document to query. Only used when useView is
true.
+ type: string
+ default: beer
+ viewName:
+ title: View Name
+ description: The view to query. Only used when useView is true.
+ type: string
+ default: brewery_beers
+ fullDocument:
+ title: Full Document
+ description: Emit the whole document rather than only the fields the
query or view returns.
+ type: boolean
+ default: false
+ limit:
+ title: Limit
+ description: The maximum number of documents to return per poll. A
negative value means no limit.
+ type: integer
+ default: -1
+ skip:
+ title: Skip
+ description: How many documents to skip before returning results. A
negative value means none.
+ type: integer
+ default: -1
+ descending:
+ title: Descending
+ description: Return the results in descending order.
+ type: boolean
+ default: false
+ delay:
+ title: Delay
+ description: The number of milliseconds between each poll.
+ type: integer
+ default: 500
+ dependencies:
+ - "camel:core"
+ - "camel:couchbase"
+ - "camel:kamelet"
+ template:
+ from:
+ uri: "couchbase:{{protocol}}://{{couchbaseHostname}}:{{couchbasePort}}"
+ parameters:
+ bucket: "{{bucket}}"
+ username: "{{username}}"
+ password: "{{password}}"
+ connectionString: "{{?connectionString}}"
+ statement: "{{?statement}}"
+ useView: "{{useView}}"
+ designDocumentName: "{{designDocumentName}}"
+ viewName: "{{viewName}}"
+ fullDocument: "{{fullDocument}}"
+ limit: "{{limit}}"
+ skip: "{{skip}}"
+ descending: "{{descending}}"
+ delay: "{{delay}}"
+ steps:
+ - to: "kamelet:sink"
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/couchbase-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/couchbase-source.kamelet.yaml
new file mode 100644
index 000000000..8a80f28f6
--- /dev/null
+++
b/library/camel-kamelets/src/main/resources/kamelets/couchbase-source.kamelet.yaml
@@ -0,0 +1,144 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+ name: couchbase-source
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "4.22.1-SNAPSHOT"
+ camel.apache.org/kamelet.icon:
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjguMzQzIDY4LjM0MyIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHVzZSB4bGluazpocmVmPSIjQSIgeD0iMi4xNzEiIHk9IjIuMTcxIi8+PHN5bWJvbCBpZD0iQSIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0zMi4wMDIgMEMxNC4zMzEuMDAyLjAwNSAxNC4zMjYgMC
[...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Couchbase"
+ camel.apache.org/kamelet.namespace: "Nosql"
+ labels:
+ camel.apache.org/kamelet.type: "source"
+spec:
+ definition:
+ title: "Couchbase Source"
+ description: |-
+ Poll a Couchbase bucket and emit the results.
+
+ By default the bucket is queried with the N1QL statement given in the
statement property. Set useView to true to poll a MapReduce view instead,
selected with designDocumentName and viewName.
+ required:
+ - protocol
+ - couchbaseHostname
+ - bucket
+ type: object
+ properties:
+ protocol:
+ title: Protocol
+ description: The protocol to use
+ type: string
+ couchbaseHostname:
+ title: Hostname
+ description: The hostname to use
+ type: string
+ couchbasePort:
+ title: Port
+ description: The port to use
+ type: integer
+ default: 8091
+ bucket:
+ title: Bucket
+ description: The bucket to use
+ type: string
+ username:
+ title: Username
+ description: Username to connect to Couchbase.
+ type: string
+ x-descriptors:
+ - urn:camel:group:credentials
+ password:
+ title: Password
+ description: Password to connect to Couchbase.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:camel:group:credentials
+ connectionString:
+ title: Connection String
+ description: The full Couchbase SDK connection string (e.g.
couchbase://host:port). When set, it takes precedence over hostname extraction
for the KV service port.
+ type: string
+ statement:
+ title: N1QL Statement
+ description: The N1QL query to run against the bucket on each poll.
Used unless useView is true.
+ type: string
+ example: "SELECT * FROM `travel-sample` LIMIT 10"
+ useView:
+ title: Use View
+ description: Poll a MapReduce view instead of running the N1QL
statement.
+ type: boolean
+ default: false
+ designDocumentName:
+ title: Design Document Name
+ description: The design document to query. Only used when useView is
true.
+ type: string
+ default: beer
+ viewName:
+ title: View Name
+ description: The view to query. Only used when useView is true.
+ type: string
+ default: brewery_beers
+ fullDocument:
+ title: Full Document
+ description: Emit the whole document rather than only the fields the
query or view returns.
+ type: boolean
+ default: false
+ limit:
+ title: Limit
+ description: The maximum number of documents to return per poll. A
negative value means no limit.
+ type: integer
+ default: -1
+ skip:
+ title: Skip
+ description: How many documents to skip before returning results. A
negative value means none.
+ type: integer
+ default: -1
+ descending:
+ title: Descending
+ description: Return the results in descending order.
+ type: boolean
+ default: false
+ delay:
+ title: Delay
+ description: The number of milliseconds between each poll.
+ type: integer
+ default: 500
+ dependencies:
+ - "camel:core"
+ - "camel:couchbase"
+ - "camel:kamelet"
+ template:
+ from:
+ uri: "couchbase:{{protocol}}://{{couchbaseHostname}}:{{couchbasePort}}"
+ parameters:
+ bucket: "{{bucket}}"
+ username: "{{username}}"
+ password: "{{password}}"
+ connectionString: "{{?connectionString}}"
+ statement: "{{?statement}}"
+ useView: "{{useView}}"
+ designDocumentName: "{{designDocumentName}}"
+ viewName: "{{viewName}}"
+ fullDocument: "{{fullDocument}}"
+ limit: "{{limit}}"
+ skip: "{{skip}}"
+ descending: "{{descending}}"
+ delay: "{{delay}}"
+ steps:
+ - to: "kamelet:sink"