Get Started with the Couchbase Source Connector for Confluent Cloud¶
The fully-managed Couchbase Source connector for Confluent Cloud moves data from a Couchbase server into an Apache Kafka® cluster. The connector configures and consumes change stream event documents and publishes them to a Kafka topic.
Note
- If you require private networking for fully-managed connectors, make sure to set up the proper networking beforehand. For more information, see Manage Networking for Confluent Cloud Connectors.
Features¶
The connector offers the following features:
- At least once delivery: The connector guarantees that records are delivered at least once to the Kafka topic.
- Topics created automatically: The connector automatically creates Kafka topics using the naming
convention:
${bucket}.${scope}.${collection}
. For more information, see Maximum message size. Note that if you want to create topics with specific settings, create the topics before running this connector. - Database authentication: Uses password authentication.
- Output data formats: Supports AVRO, BSON, JSON, JSON_SR or PROTOBUF output data. Schema Registry must be enabled to use a Schema Registry-based format ( for example, AVRO, JSON_SR (JSON Schema), or PROTOBUF). For more information, see Schema Registry Enabled Environments.
- Large size records: Supports CouchDB documents up to 20 MB in size on Dedicated Kafka clusters and 8 MB on other clusters.
- Offset management capabilities: The connector supports offset management. For more information, see Manage custom offsets.
For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect Usage Examples section.
Limitations¶
Be sure to review the following information.
- For connector limitations, see Couchbase Source limitations.
- If you plan to use one or more Single Message Transforms (SMTs), see SMT Limitations.
- If you plan to use Confluent Cloud Schema Registry, see Schema Registry Enabled Environments.
Maximum message size¶
This connector creates topics automatically. When it creates topics, the internal connector configuration property max.message.bytes
is set to the following:
- Basic cluster:
8 MB
- Standard cluster:
8 MB
- Enterprise cluster:
8 MB
- Dedicated cluster:
20 MB
For more information about Confluent Cloud clusters, see Kafka Cluster Types in Confluent Cloud.
Manage custom offsets¶
You can manage the offsets for this connector. Offsets provide information on the point in the system from which the connector is accessing data. For more information, see Manage Offsets for Fully-Managed Connectors in Confluent Cloud.
To manage offsets:
- Manage offsets using Confluent Cloud APIs. For more information, see Cluster API reference.
To get the current offset, make a GET
request that specifies the environment, Kafka cluster, and connector name.
GET /connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors/{connector_name}/offsets
Host: https://api.confluent.cloud
Response:
Successful calls return HTTP 200
with a JSON payload that describes the offset.
{
"id":"lcc-example123",
"name":"CouchbaseSourceConnector_0",
"offsets":[
{
"partition":{
"bucket":"bug-bash-bucket",
"partition":"248"
},
"offset":{
"bySeqno":274,
"collectionsManifestUid":3,
"snapshotEndSeqno":388,
"snapshotStartSeqno":0,
"vbuuid":182783710637986
}
}
],
"metadata":{
"observed_at":"2025-06-17T07:18:42.537181086Z"
}
}
Responses include the following information:
- The position of latest offset.
- The observed time of the offset in the metadata portion of the payload. The
observed_at
time indicates a snapshot in time for when the API retrieved the offset. A running connector is always updating its offsets. Useobserved_at
to get a sense for the gap between real time and the time at which the request was made. By default, offsets are observed every minute. CallingGET
repeatedly will fetch more recently observed offsets. - Information about the connector.
To update the offset, make a POST
request that specifies the environment, Kafka cluster, and connector
name. Include a JSON payload that specifies new offset and a patch type.
POST /connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors/{connector_name}/offsets/request
Host: https://api.confluent.cloud
{
"type":"PATCH",
"offsets":[
{
"partition":{
"bucket":"bug-bash-bucket",
"partition":248
},
"offset":{
"bySeqno":274,
"collectionsManifestUid":3,
"snapshotEndSeqno":388,
"snapshotStartSeqno":0,
"vbuuid":182783710637986
}
}
]
}
Considerations:
- You can only make one offset change at a time for a given connector.
- This is an asynchronous request. To check the status of this request, you must use the check offset status API. For more information, see Get the status of an offset request.
- For source connectors, the connector attempts to read from the position defined by the requested offsets.
Response:
Successful calls return HTTP 202 Accepted
with a JSON payload that describes the offset.
{
"id":"lcc-example123",
"name":"CouchbaseSourceConnector_0",
"offsets":[
{
"partition":{
"bucket":"bug-bash-bucket",
"partition":248
},
"offset":{
"bySeqno":274,
"collectionsManifestUid":3,
"snapshotEndSeqno":388,
"snapshotStartSeqno":0,
"vbuuid":182783710637986
}
}
],
"requested_at":"2025-06-17T07:42:05.262838267Z",
"type":"PATCH"
}
Responses include the following information:
- The requested position of the offsets in the source.
- The time of the request to update the offset.
- Information about the connector.
To delete the offset, make a POST
request that specifies the environment, Kafka cluster, and connector
name. Include a JSON payload that specifies the delete type.
POST /connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors/{connector_name}/offsets/request
Host: https://api.confluent.cloud
{
"type": "DELETE"
}
Considerations:
- Delete requests delete the offset for the provided partition and reset to the base state. A delete request is as if you created a fresh new connector.
- This is an asynchronous request. To check the status of this request, you must use the check offset status API. For more information, see Get the status of an offset request.
- Do not issue delete and patch requests at the same time.
- For source connectors, the connector attempts to read from the position defined in the base state.
Response:
Successful calls return HTTP 202 Accepted
with a JSON payload that describes the result.
{
"id": "lcc-example123",
"name": "CouchbaseSourceConnector_0",
"offsets": [],
"requested_at": "2025-06-28T17:59:45.606796307Z",
"type": "DELETE"
}
Responses include the following information:
- Empty offsets.
- The time of the request to delete the offset.
- Information about the Kafka cluster and connector.
- The type of request.
To get the status of a previous offset request, make a GET
request that specifies the environment, Kafka cluster, and connector
name.
GET /connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors/{connector_name}/offsets/request/status
Host: https://api.confluent.cloud
Considerations:
- The status endpoint always shows the status of the most recent PATCH/DELETE operation.
Response:
Successful calls return HTTP 200
with a JSON payload that describes the result. The following is an example
of an applied patch.
{
"request":{
"id":"lcc-example123",
"name":"CouchbaseSourceConnector_0",
"offsets":[
{
"partition":{
"bucket":"bug-bash-bucket",
"partition":248
},
"offset":{
"bySeqno":274,
"collectionsManifestUid":3,
"snapshotEndSeqno":388,
"snapshotStartSeqno":0,
"vbuuid":182783710637986
}
}
],
"requested_at":"2025-06-17T07:42:05.262838267Z",
"type":"PATCH"
},
"status":{
"phase":"APPLIED",
"message":"The Connect framework-managed offsets for this connector have been altered successfully. However, if this connector manages offsets externally, they will need to be manually altered in the system that the connector uses."
},
"previous_offsets":[
{
"partition":{
"bucket":"bug-bash-bucket",
"partition":"248"
},
"offset":{
"bySeqno":274,
"collectionsManifestUid":3,
"snapshotEndSeqno":388,
"snapshotStartSeqno":0,
"vbuuid":182783710637986
}
}
],
"applied_at":"2025-06-17T07:42:07.749486627Z"
}
Responses include the following information:
- The original request, including the time it was made.
- The status of the request: applied, pending, or failed.
- The time you issued the status request.
- The previous offsets. These are the offsets that the connector last updated prior to updating the offsets. Use these to try to restore the state of your connector if a patch update causes your connector to fail or to return a connector to its previous state after rolling back.
JSON payload¶
The table below offers a description of the unique fields in the JSON payload for managing offsets of the Couchbase Source connector.
Field | Definition | Required/Optional |
---|---|---|
ns |
ns is the connection string, including the connection host. If the configuration file for
the connector includes a value in offset.partition.name , the value in offset.partition.name is used for ns . |
Required |
_id |
_id is the _data field from the source record in Couchbase. |
Required |
Quick Start¶
Use this quick start to get up and running with the Confluent Cloud Couchbase Source connector. The quick start provides the basics of selecting the connector and configuring it to consume data from Couchbase DB and persist the data to Kafka.
- Prerequisites
- Authorized access to a Confluent Cloud cluster on Amazon Web Services (AWS), Microsoft Azure (Azure), or Google Cloud.
- The Confluent CLI installed and configured for the cluster. For more information, see Install the Confluent CLI.
- Schema Registry must be enabled to use a Schema Registry-based format (for example, AVRO, JSON_SR (JSON Schema), or PROTOBUF). For more information, see Schema Registry Enabled Environments.
- Access to a Couchbase server.
- The connector automatically creates Kafka topics using the naming convention:
${bucket}.${scope}.${collection}
. - For networking considerations, see Networking and DNS. To use a set of public egress IP addresses, see Public Egress IP Addresses for Confluent Cloud Connectors.
- Kafka cluster credentials. The following lists the different ways you can provide credentials.
- Enter an existing service account resource ID.
- Create a Confluent Cloud service account for the connector. Make sure to review the ACL entries required in the service account documentation. Some connectors have specific ACL requirements.
- Create a Confluent Cloud API key and secret. To create a key and secret, you can use confluent api-key create or you can autogenerate the API key and secret directly in the Cloud Console when setting up the connector.
Using the Confluent Cloud Console¶
Step 1: Launch your Confluent Cloud cluster¶
To create and launch a Kafka cluster in Confluent Cloud, see Create a kafka cluster in Confluent Cloud.
Step 2: Add a connector¶
In the left navigation menu, click Connectors. If you already have connectors in your cluster, click + Add connector.
Step 4: Enter the connector details¶
Note
- Make sure you have all your prerequisites completed.
- An asterisk ( * ) designates a required entry.
At the Couchbase Source Connector screen, complete the following:
- Select the way you want to provide Kafka Cluster credentials. You can
choose one of the following options:
- My account: This setting allows your connector to globally access everything that you have access to. With a user account, the connector uses an API key and secret to access the Kafka cluster. This option is not recommended for production.
- Service account: This setting limits the access for your connector by using a service account. This option is recommended for production.
- Use an existing API key: This setting allows you to specify an API key and a secret pair. You can use an existing pair or create a new one. This method is not recommended for production environments.
Note
Freight clusters support only service accounts for Kafka authentication.
- Click Continue.
- Add the following database connection details:
- Couchbase Seed Nodes: A comma-separated addresses of Couchbase Server nodes.
If a custom port is specified, it must be the KV port (which is normally
11210
for insecure connections, or11207
for secure connections). - Couchbase Username: The name of the Couchbase user connecting to the Couchbase database.
- Couchbase Password: The password of the Couchbase user connecting to the Couchbase database.
This value may be overridden by the
KAFKA_COUCHBASE_PASSWORD
environment variable. - Couchbase Bucket: Name of the Couchbase bucket to use. This property is required
unless using the experimental
AnalyticsSinkHandler
.
- Couchbase Seed Nodes: A comma-separated addresses of Couchbase Server nodes.
If a custom port is specified, it must be the KV port (which is normally
- Click Continue.
Configure the following:
Output messages
Output Kafka record value format: Sets the output Kafka record value format (data going to the Kafka topic). Valid entries are AVRO, BSON, JSON, JSON_SR (JSON Schema), or PROTOBUF. Note that you need to have Schema Registry configured if using a schema-based message format like AVRO, JSON_SR, and PROTOBUF.
Note
When you set the output Kafka record value format to JSON_SR, AVRO, or PROTOBUF, only the metadata in the payload will have a schema; the Couchbase document itself will be schema-less.
Source Behavior
Default Kafka Topic: Name of the default Kafka topic to publish data to for collections that do not have an entry in the
couchbase.collection.to.topic
map. This is a format string that recognizes the following placeholders:${bucket}
refers to the bucket containing the document.${scope}
refers to the scope containing the document.${collection}
refers to the collection containing the document.
Collection to Topic Map: A comma-delimited map from Couchbase collection to Kafka topic. Collection and Topic are joined by an equals sign (=). For example, to write messages from collection
"scope-a.invoices"
to topic"topic1"
, and messages from collection"scope-a.widgets"
to topic"topic2"
, you would write"scope-a.invoices=topic1,scope-a.widgets=topic2"
. Defaults to an empty map. For collections not present in this map, the destination topic is determined by thecouchbase.topic
configuration property.Source Handler Class: The fully-qualified class name of the source handler to use. The source handler determines how the Couchbase document is converted into a Kafka record. To publish JSON messages identical to the Couchbase documents, use
com.couchbase.connect.kafka.handler.source.RawJsonSourceHandler
and setvalue.converter
toorg.apache.kafka.connect.converters.ByteArrayConverter
. When using a custom source handler that filters out certain messages, consider also configuringcouchbase.black.hole.topic
as mentioned below.Note
- Default data format for Kafka topics: By default, the Couchbase source connector sends documents to Kafka topics as raw bytes.
- JSON format in Kafka topics: To publish data in JSON format to Kafka topics, choose one of the following:
- Set
output.data.format
toBSON
andcouchbase.source.handler
tocom.couchbase.connect.kafka.handler.source.RawJsonSourceHandler
. - Set
output.data.format
toJSON
andcouchbase.source.handler
tocom.couchbase.connect.kafka.handler.source.RawJsonSourceHandler
. Then, add the Couchbase DeserializeJson SMT to your configuration.
- Set
- Other Data Formats: For all other combinations of
output.data.format
values and source handler configurations, data will be written to the Kafka topic in byte-array or base64 encoded format, depending on your configuration settings.
Metadata Headers: A comma-delimited list of Couchbase metadata headers to add to records. Valid values are:
bucket
: Name of the bucket the document came from.scope
: Name of the scope the document came from.collection
: Name of the collection the document came from.key
: The Couchbase document ID.qualifiedKey
: The document’s scope, collection, and document ID, delimited by dots. For example,myScope.myCollection.myDocumentId
.cas
: The document’s “compare and swap” value.partition
: The index of the Couchbase partition the document came from.partitionUuid
: Identifies the history branch of the partition the document came from.seqno
: The DCP sequence number of the event.rev
: The revision number of the event.expiry
: The epoch second when the document expires, ornull
if the document has no expiry or if the event is a deletion.
Header Name Prefix: The connector prepends this value to header names to prevent collision with headers set by other parts of the system. For example, if
couchbase.headers
is set tobucket,qualifiedKey
andheader.name.prefix
is set toexample
, then records will have headers namedexample.bucket
andexample.qualifiedKey
.Event Filter Class: The class name of the event filter to use. The event filter determines whether a database change event is ignored. As of version
4.2.4
, the default filter ignores events from the Couchbase_system
scope. If you are interested in those events too, set this property tocom.couchbase.connect.kafka.filter.AllPassIncludingSystemFilter
. For more information, seecouchbase.black.hole.topic
property.Black Hole Topic: If this property is non-blank, the connector publishes a tiny synthetic record to this topic whenever the
Filter
orSourceHandler
ignores a source event. This lets the connector tell the Kafka Connect framework about the source offset of the ignored event. Configure this topic to use small segments and the lowest possible retention settings.Initial Offset Topic: When
couchbase.stream.from
is set toSAVED_OFFSET_OR_NOW
and this property is not blank:- On startup, the connector publishes a synthetic record to the specified topic for each source partition that does not yet have a saved offset.
- This action lets connector initialize those missing source offsets to
now
(the current state of Couchbase).
Batch Size: Controls the maximum size of the batch for writing into a topic.
Stream From: Controls when in the history the connector starts streaming from.
Scope: If you wish to stream from all collections within a scope, specify the scope name here. Requires Couchbase Server
7.0
or later.Collections: If you wish to stream from specific collections, specify the qualified collection names here, separated by commas. A qualified name is the name of the scope followed by a dot (.) and then the name of the collection. For example, “tenant-foo.invoices”.
- If you specify neither
couchbase.scope
norcouchbase.collections
, the connector will stream from all collections of all scopes in the bucket. - Requires Couchbase Server 7.0 or later.
- If you specify neither
Show advanced configurations
Schema context: Select a schema context to use for this connector, if using a schema-based data format. This property defaults to the Default context, which configures the connector to use the default schema set up for Schema Registry in your Confluent Cloud environment. A schema context allows you to use separate schemas (like schema sub-registries) tied to topics in different Kafka clusters that share the same Schema Registry environment. For example, if you select a non-default context, a Source connector uses only that schema context to register a schema and a Sink connector uses only that schema context to read from. For more information about setting up a schema context, see What are schema contexts and when should you use them?.
Additional configurations
To add an additional configuration, see Additional Connector Configuration Reference for Confluent Cloud.
Auto-restart policy
Enable Connector Auto-restart: Control the auto-restart behavior of the connector and its task in the event of user-actionable errors. Defaults to
true
, enabling the connector to automatically restart in case of user-actionable errors. Set this property tofalse
to disable auto-restart for failed connectors. In such cases, you would need to manually restart the connector.
Transforms
Single Message Transforms: To add a new SMT, see Add transforms. For more information about unsupported SMTs, see Unsupported transformations.
Processing position
Set offsets: Click Set offsets to define a specific offset for this connector to begin procession data from. For more information on managing offsets, see Manage offsets.
For all property values and definitions, see Configuration Properties.
Click Continue.
Based on the number of topic partitions you select, you will be provided with a recommended number of tasks.
- To change the number of recommended tasks, enter the number of tasks for the connector to use in the Tasks field.
- Click Continue.
Verify the connection details by previewing the running configuration.
Tip
For information about previewing your connector output, see Data Previews for Confluent Cloud Connectors.
After you’ve validated that the properties are configured to your satisfaction, click Launch.
The status for the connector should go from Provisioning to Running.
Step 5: Check the Kafka topic¶
After the connector is running, verify that Couchbase documents are populating the Kafka topic.
For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect Usage Examples section.
Using the Confluent CLI¶
Complete the following steps to set up and run the connector using the Confluent CLI.
Note
Make sure you have all your prerequisites completed.
Step 1: List the available connectors¶
Enter the following command to list available connectors:
confluent connect plugin list
Step 2: List the connector configuration properties¶
Enter the following command to show the connector configuration properties:
confluent connect plugin describe <connector-plugin-name>
The command output shows the required and optional configuration properties.
Step 3: Create the connector configuration file¶
Create a JSON file that contains the connector configuration properties. The following example shows the required connector properties.
{
"connector.class": "CouchbaseSource",
"name": "<my-connector-name>",
"kafka.auth.mode": "KAFKA_API_KEY",
"kafka.api.key": "<my-kafka-api-key>",
"kafka.api.secret": "<my-kafka-api-secret>",
"couchbase.seed.nodes": "<couchbase-node-address>",
"couchbase.bucket": "<bucket-name>",
"couchbase.topic": "<topic>",
"couchbase.username": "<database-username>",
"couchbase.password": "<database-password>",
"couchbase.source.handler": "com.couchbase.connect.kafka.handler.source.DefaultSchemaSourceHandler",
"couchbase.batch.size.max": "2000",
"output.data.format": "JSON",
"tasks.max": "1",
"auto.restart.on.user.error": "true"
}
Note the following property definitions:
"connector.class"
: Identifies the connector plugin name."name"
: Sets a name for your new connector.
"kafka.auth.mode"
: Identifies the connector authentication mode you want to use. There are two options:SERVICE_ACCOUNT
orKAFKA_API_KEY
(the default). To use an API key and secret, specify the configuration propertieskafka.api.key
andkafka.api.secret
, as shown in the example configuration (above). To use a service account, specify the Resource ID in the propertykafka.service.account.id=<service-account-resource-ID>
. To list the available service account resource IDs, use the following command:confluent iam service-account list
For example:
confluent iam service-account list Id | Resource ID | Name | Description +---------+-------------+-------------------+------------------- 123456 | sa-l1r23m | sa-1 | Service account 1 789101 | sa-l4d56p | sa-2 | Service account 2
"couchbase.seed.nodes"
: A comma-separated addresses of Couchbase Server nodes. If a custom port is specified, it must be the KV port (which is normally11210
for insecure connections, or11207
for secure connections)."couchbase.bucket"
: Name of the Couchbase bucket to use. This property is required unless using the experimentalAnalyticsSinkHandler
."couchbase.username"
: The name of the Couchbase user connecting to the Couchbase database."couchbase.password"
: The password of the Couchbase user connecting to the Couchbase database. This value may be overridden by theKAFKA_COUCHBASE_PASSWORD
environment variable."couchbase.source.handler"
: The source handler determines how the Couchbase document is converted into a Kafka record. When using a custom source handler that filters out certain messages, consider also configuringcouchbase.black.hole.topic
property.Note
- Default data format for Kafka topics: By default, the Couchbase source connector sends documents to Kafka topics as raw bytes.
- JSON format in Kafka topics: To publish data in JSON format to Kafka topics, choose one of the following:
- Set
output.data.format
toBSON
andcouchbase.source.handler
tocom.couchbase.connect.kafka.handler.source.RawJsonSourceHandler
. - Set
output.data.format
toJSON
andcouchbase.source.handler
tocom.couchbase.connect.kafka.handler.source.RawJsonSourceHandler
. Then, add the Couchbase DeserializeJson SMT to your configuration.
- Set
- Other Data Formats: For all other combinations of
output.data.format
values and source handler configurations, data will be written to the Kafka topic in byte-array or base64 encoded format, depending on your configuration settings.
"couchbase.batch.size.max"
: Controls the maximum size of the batch for writing into a topic."output.data.format"
: Sets the output Kafka record value format (data coming from the connector). Valid entries areAVRO
,JSON_SR
,PROTOBUF
,JSON
orBSON
. You must have Confluent Cloud Schema Registry configured if using a schema-based message format (for example, Avro, JSON_SR (JSON Schema), or Protobuf).Note
When you set the output Kafka record value format to
JSON_SR
,AVRO
, orPROTOBUF
, only the metadata in the payload will have a schema; the Couchbase document itself will be schema-less.It chooses the appropriate converter and populates the derived settings
output.format.key
andoutput.format.value
according to the table shown below.output.data.format
Converter output.format.key
output.format.value
AVRO
AvroConverter schema schema JSON_SR
JsonSchemaConverter schema schema PROTOBUF
ProtobufConverter schema schema JSON
JsonConverter schema schema BSON
ByteArrayConverter bson bson If you select AVRO, be sure to set Compatibility mode (
schema.compatibility.level
) toNONE
in Schema Registry. Note that schemas are generated per document in isolation. If not set to NONE, there is a chance that the new schema generated for the new document will not be backward compatible with previous versions of the schema."tasks.max"
: Enter the maximum number of tasks for the connector to use. More tasks might improve performance.
Single Message Transforms: See the Single Message Transforms (SMT) documentation for details about adding SMTs using the CLI.
See Configuration Properties for all property values and definitions.
Step 4: Load the properties file and create the connector¶
Enter the following command to load the configuration and start the connector:
confluent connect cluster create --config-file <file-name>.json
For example:
confluent connect cluster create --config-file couchbase-source.json
Example output:
Created connector confluent-couchbase-source lcc-ix4dl
Step 5: Check the connector status¶
Enter the following command to check the connector status:
confluent connect cluster list
Example output:
ID | Name | Status | Type
+-----------+---------------------------+---------+-------+
lcc-ix4dl | confluent-couchbase-source | RUNNING | source
Step 6: Check the Kafka topic.¶
After the connector is running, verify that Couchbase documents are populating the Kafka topic.
For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect Usage Examples section.
Configuration Properties¶
Use the following configuration properties with the fully-managed connector. For self-managed connector property definitions and other details, see the connector docs in Self-managed connectors for Confluent Platform.
How should we connect to your data?¶
name
Sets a name for your connector.
- Type: string
- Valid Values: A string at most 64 characters long
- Importance: high
Schema Config¶
schema.context.name
Add a schema context name. A schema context represents an independent scope in Schema Registry. It is a separate sub-schema tied to topics in different Kafka clusters that share the same Schema Registry instance. If not used, the connector uses the default schema configured for Schema Registry in your Confluent Cloud environment.
- Type: string
- Default: default
- Importance: medium
Kafka Cluster credentials¶
kafka.auth.mode
Kafka Authentication mode. It can be one of KAFKA_API_KEY or SERVICE_ACCOUNT. It defaults to KAFKA_API_KEY mode.
- Type: string
- Default: KAFKA_API_KEY
- Valid Values: KAFKA_API_KEY, SERVICE_ACCOUNT
- Importance: high
kafka.api.key
Kafka API Key. Required when kafka.auth.mode==KAFKA_API_KEY.
- Type: password
- Importance: high
kafka.service.account.id
The Service Account that will be used to generate the API keys to communicate with Kafka Cluster.
- Type: string
- Importance: high
kafka.api.secret
Secret associated with Kafka API key. Required when kafka.auth.mode==KAFKA_API_KEY.
- Type: password
- Importance: high
Connection¶
couchbase.seed.nodes
Addresses of Couchbase Server nodes, delimited by commas. If a custom port is specified, it must be the KV port (which is normally 11210 for insecure connections, or 11207 for secure connections).
- Type: string
- Importance: high
couchbase.username
Name of the Couchbase user to authenticate as.
- Type: string
- Importance: high
couchbase.password
Password of the Couchbase user.
- Type: password
- Importance: high
couchbase.bucket
Name of the Couchbase bucket to use. This property is required unless using the experimental AnalyticsSinkHandler.
- Type: string
- Default: “”
- Importance: high
Source Behavior¶
couchbase.topic
Name of the default Kafka topic to publish data to, for collections that don’t have an entry in the couchbase.collection.to.topic map. This is a format string that recognizes the following placeholders: ${bucket} refers to the bucket containing the document. ${scope} refers to the scope containing the document. ${collection} refers to the collection containing the document.
- Type: string
- Default: ${bucket}.${scope}.${collection}
- Importance: medium
couchbase.collection.to.topic
A map from Couchbase collection to Kafka topic. Collection and Topic are joined by an equals sign. Map entries are delimited by commas. For example, if you want to write messages from collection “scope-a.invoices” to topic “topic1”, and messages from collection “scope-a.widgets” to topic “topic2”, you would write: “scope-a.invoices=topic1,scope-a.widgets=topic2”. Defaults to an empty map. For collections not present in this map, the destination topic is determined by the couchbase.topic config property.
- Type: string
- Default: “”
- Importance: medium
couchbase.source.handler
The fully-qualified class name of the source handler to use. The source handler determines how the Couchbase document is converted into a Kafka record. To publish JSON messages identical to the Couchbase documents, use com.couchbase.connect.kafka.handler.source.RawJsonSourceHandler and set value.converter to org.apache.kafka.connect.converters.ByteArrayConverter. When using a custom source handler that filters out certain messages, consider also configuring couchbase.black.hole.topic. See that property’s documentation for details.
- Type: string
- Valid Values: com.couchbase.connect.kafka.handler.source.DefaultSchemaSourceHandler, com.couchbase.connect.kafka.handler.source.RawJsonSourceHandler, com.couchbase.connect.kafka.handler.source.RawJsonWithMetadataSourceHandler
- Importance: medium
couchbase.headers
Comma-delimited list of Couchbase metadata headers to add to records. Recognized values: bucket - Name of the bucket the document came from. scope - Name of the scope the document came from. collection - Name of the collection the document came from. key - The Couchbase document ID. qualifiedKey - The document’s scope, collection, and document ID, delimited by dots. Example: myScope.myCollection.myDocumentId cas - The document’s “compare and swap” value. partition - The index of the Couchbase partition the document came from. partitionUuid - Identifies the history branch of the partition the document came from. seqno - The DCP sequence number of the event. rev - The revision number of the event. expiry - The epoch second when the document expires, or null if the document has no expiry (or if the event is a deletion).
- Type: list
- Default: “”
- Importance: medium
couchbase.header.name.prefix
The connector prepends this value to header names to prevent collision with headers set by other parts of the system. For example, if couchbase.headers is set to bucket,qualifiedKey and header.name.prefix is set to example. then records will have headers named example.bucket and example.qualifiedKey.
- Type: string
- Default: couchbase.
- Importance: medium
couchbase.event.filter
The class name of the event filter to use. The event filter determines whether a database change event is ignored. As of version 4.2.4, the default filter ignores events from the Couchbase _system scope. If you are interested in those events too, set this property to com.couchbase.connect.kafka.filter.AllPassIncludingSystemFilter. See also couchbase.black.hole.topic.
- Type: string
- Default: com.couchbase.connect.kafka.filter.AllPassFilter
- Valid Values: com.couchbase.connect.kafka.filter.AllPassFilter, com.couchbase.connect.kafka.filter.AllPassIncludingSystemFilter
- Importance: medium
couchbase.black.hole.topic
If this property is non-blank, the connector publishes a tiny synthetic record to this topic whenever the Filter or SourceHandler ignores a source event. This lets the connector tell the Kafka Connect framework about the source offset of the ignored event. Configure this topic to use small segments and the lowest possible retention settings.
- Type: string
- Default: “”
- Importance: medium
couchbase.initial.offset.topic
If couchbase.stream.from is SAVED_OFFSET_OR_NOW, and this property is non-blank, on startup the connector publishes to the named topic one tiny synthetic record for each source partition that does not yet have a saved offset. This lets the connector initialize the missing source offsets to ‘now’ (the current state of Couchbase).
- Type: string
- Default: “”
- Importance: medium
couchbase.batch.size.max
Controls maximum size of the batch for writing into topic.
- Type: int
- Default: 2000
- Importance: medium
couchbase.stream.from
Controls when in the history the connector starts streaming from.
- Type: string
- Default: SAVED_OFFSET_OR_BEGINNING
- Valid Values: BEGINNING, NOW, SAVED_OFFSET_OR_BEGINNING, SAVED_OFFSET_OR_NOW
- Importance: medium
couchbase.scope
If you wish to stream from all collections within a scope, specify the scope name here. Requires Couchbase Server 7.0 or later.
- Type: string
- Default: “”
- Importance: medium
couchbase.collections
If you wish to stream from specific collections, specify the qualified collection names here, separated by commas. A qualified name is the name of the scope followed by a dot (.) and then the name of the collection. For example: “tenant-foo.invoices”. If you specify neither “couchbase.scope” nor “couchbase.collections”, the connector will stream from all collections of all scopes in the bucket. Requires Couchbase Server 7.0 or later.
- Type: string
- Default: “”
- Importance: medium
Additional Configs¶
header.converter
The converter class for the headers. This is used to serialize and deserialize the headers of the messages.
- Type: string
- Importance: low
producer.override.compression.type
The compression type for all data generated by the producer.
- Type: string
- Importance: low
producer.override.linger.ms
The producer groups together any records that arrive in between request transmissions into a single batched request. More details can be found in the documentation: https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#linger-ms.
- Type: long
- Valid Values: [100,…,1000]
- Importance: low
value.converter.allow.optional.map.keys
Allow optional string map key when converting from Connect Schema to Avro Schema. Applicable for Avro Converters.
- Type: boolean
- Importance: low
value.converter.auto.register.schemas
Specify if the Serializer should attempt to register the Schema.
- Type: boolean
- Importance: low
value.converter.connect.meta.data
Allow the Connect converter to add its metadata to the output schema. Applicable for Avro Converters.
- Type: boolean
- Importance: low
value.converter.enhanced.avro.schema.support
Enable enhanced schema support to preserve package information and Enums. Applicable for Avro Converters.
- Type: boolean
- Importance: low
value.converter.enhanced.protobuf.schema.support
Enable enhanced schema support to preserve package information. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.flatten.unions
Whether to flatten unions (oneofs). Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.generate.index.for.unions
Whether to generate an index suffix for unions. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.generate.struct.for.nulls
Whether to generate a struct variable for null values. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.int.for.enums
Whether to represent enums as integers. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.latest.compatibility.strict
Verify latest subject version is backward compatible when use.latest.version is true.
- Type: boolean
- Importance: low
value.converter.object.additional.properties
Whether to allow additional properties for object schemas. Applicable for JSON_SR Converters.
- Type: boolean
- Importance: low
value.converter.optional.for.nullables
Whether nullable fields should be specified with an optional label. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.optional.for.proto2
Whether proto2 optionals are supported. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.scrub.invalid.names
Whether to scrub invalid names by replacing invalid characters with valid characters. Applicable for Avro and Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.use.latest.version
Use latest version of schema in subject for serialization when auto.register.schemas is false.
- Type: boolean
- Importance: low
value.converter.use.optional.for.nonrequired
Whether to set non-required properties to be optional. Applicable for JSON_SR Converters.
- Type: boolean
- Importance: low
value.converter.wrapper.for.nullables
Whether nullable fields should use primitive wrapper messages. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
value.converter.wrapper.for.raw.primitives
Whether a wrapper message should be interpreted as a raw primitive at root level. Applicable for Protobuf Converters.
- Type: boolean
- Importance: low
errors.tolerance
Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.
- Type: string
- Default: none
- Importance: low
key.converter.key.subject.name.strategy
How to construct the subject name for key schema registration.
- Type: string
- Default: TopicNameStrategy
- Importance: low
value.converter.decimal.format
Specify the JSON/JSON_SR serialization format for Connect DECIMAL logical type values with two allowed literals:
BASE64 to serialize DECIMAL logical types as base64 encoded binary data and
NUMERIC to serialize Connect DECIMAL logical type values in JSON/JSON_SR as a number representing the decimal value.
- Type: string
- Default: BASE64
- Importance: low
value.converter.flatten.singleton.unions
Whether to flatten singleton unions. Applicable for Avro and JSON_SR Converters.
- Type: boolean
- Default: false
- Importance: low
value.converter.ignore.default.for.nullables
When set to true, this property ensures that the corresponding record in Kafka is NULL, instead of showing the default column value. Applicable for AVRO,PROTOBUF and JSON_SR Converters.
- Type: boolean
- Default: false
- Importance: low
value.converter.reference.subject.name.strategy
Set the subject reference name strategy for value. Valid entries are DefaultReferenceSubjectNameStrategy or QualifiedReferenceSubjectNameStrategy. Note that the subject reference name strategy can be selected only for PROTOBUF format with the default strategy being DefaultReferenceSubjectNameStrategy.
- Type: string
- Default: DefaultReferenceSubjectNameStrategy
- Importance: low
value.converter.replace.null.with.default
Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Converter.
- Type: boolean
- Default: true
- Importance: low
value.converter.schemas.enable
Include schemas within each of the serialized values. Input messages must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Converter.
- Type: boolean
- Default: false
- Importance: low
value.converter.value.subject.name.strategy
Determines how to construct the subject name under which the value schema is registered with Schema Registry.
- Type: string
- Default: TopicNameStrategy
- Importance: low
Number of tasks for this connector¶
tasks.max
Maximum number of tasks for the connector.
- Type: int
- Valid Values: [1,…]
- Importance: high
Output messages¶
output.data.format
Sets the output Kafka record value format. Valid entries are AVRO, JSON_SR, PROTOBUF, JSON, STRING or BSON. Note that you need to have Confluent Cloud Schema Registry configured if using a schema-based message format like AVRO, JSON_SR, and PROTOBUF
- Type: string
- Default: STRING
- Importance: high
Auto-restart policy¶
auto.restart.on.user.error
Enable connector to automatically restart on user-actionable errors.
- Type: boolean
- Default: true
- Importance: medium
Next Steps¶
For an example that shows fully-managed Confluent Cloud connectors in action with Confluent Cloud ksqlDB, see the Cloud ETL Demo. This example also shows how to use Confluent CLI to manage your resources in Confluent Cloud.