hosts |
[]string |
yes |
- |
Couchbase hosts, e.g. localhost:8091. |
username |
string |
yes |
- |
Couchbase username. |
password |
string |
yes |
- |
Couchbase password. |
bucketName |
string |
yes |
- |
Couchbase DCP bucket. |
dcp.group.name |
string |
yes |
- |
DCP consumer group name used for membership coordination and checkpoint keys. |
scopeName |
string |
no |
_default |
Couchbase scope name, or * to stream all scopes and collections in the bucket dynamically. |
collectionNames |
[]string |
no |
_default |
Couchbase collection names, or ["*"] to stream all existing and future collections inside scopeName dynamically. |
connectionBufferSize |
uint, string |
no |
20mb |
Source bucket TCP connection buffer size (x Node Count). Check this if you get OOM killed. |
maxQueueSize |
int |
no |
2048 |
Maximum number of KV requests that can be queued waiting to be sent to a node. Check this if you get queue overflowed or queue full. |
connectionTimeout |
time.Duration |
no |
1m |
Couchbase connection timeout. |
maxIdemponentCallAttempts |
int |
no |
1 |
Maximum attempts for idempotent Couchbase management HTTP calls (values <= 0 default to 1). |
secureConnection |
bool |
no |
false |
Enable TLS connection to Couchbase. |
rootCAPath |
string |
no |
*not set |
Path to root CA PEM file. Required when secureConnection is true. |
debug |
bool |
no |
false |
Enables debug API endpoints (/states/offset, /states/followers, /debug/pprof/*). |
dcp.bufferSize |
uint, string |
no |
16mb |
DCP internal queue buffer size (x Node Count). Accepts integer bytes or size strings like 16mb. Check this if you get OOM killed. |
dcp.prefetch.enabled |
bool |
no |
false |
Enables a byte-bounded sliding prefetch buffer between gocbcore and your consumer so Couchbase can stream the next window while your consumer processes the current one. |
dcp.prefetch.bufferSize |
uint, string |
no |
dcp.bufferSize |
Total byte capacity shared across the prefetch buffer (not multiplied by data node count) when dcp.prefetch.enabled is true. Applies backpressure to DCP once full. |
dcp.prefetch.workers |
int |
no |
1 |
Number of per-vBucket sharded worker goroutines (vbID % workers, 1..1024, capped at assigned vBucket count) when dcp.prefetch.enabled is true. Preserves strict per-vBucket event ordering. |
dcp.mode |
string |
no |
infinite |
Set finite to stream existing events up to the current high sequence numbers (or dcp.endTime) and exit automatically; set infinite to stream continuously. |
dcp.endTime |
time.Time |
no |
*not set |
Optional point-in-time upper bound for dcp.mode: finite (RFC3339). Drops events strictly after endTime; historical endTime stops each vBucket early once crossed, while a future endTime streams live until the deadline elapses. |
dcp.connectionBufferSize |
uint, string |
no |
20mb |
DCP TCP connection buffer size (x Node Count). Check this if you get OOM killed. |
dcp.connectionTimeout |
time.Duration |
no |
1m |
DCP connection timeout. |
dcp.maxQueueSize |
int |
no |
2048 |
Maximum number of DCP requests that can be queued waiting to be sent to a node. |
dcp.listener.skipUntil |
time.Time |
no |
*not set |
Skip events whose timestamp is earlier than this time. |
dcp.group.membership.type |
string |
no |
couchbase |
DCP membership type: couchbase, kubernetesHa, kubernetesStatefulSet, static, or dynamic. |
dcp.group.membership.assignmentStrategy |
string |
no |
consistent |
vBucket partitioning strategy: consistent (identity-based Rendezvous/HRW hashing on couchbase & kubernetesHa with 0% survivor churn on any pod crash/rollover; Jump Consistent Hash on static/kubernetesStatefulSet/dynamic) or range (contiguous chunks). Combined with incremental diff-based rebalancing and a two-phase peer release barrier (rebalanceDelay acts as the safety ceiling). Mixed-version couchbase/kubernetesHa rolling upgrades automatically negotiate range until all live pods support consistent. |
dcp.group.membership.memberNumber |
int |
no |
1 |
1-based member index (1 <= memberNumber <= totalMembers). Used when membership is static. |
dcp.group.membership.totalMembers |
int |
no |
1 |
Total members (1..4096). Used when membership is static or kubernetesStatefulSet. |
dcp.group.membership.rebalanceDelay |
time.Duration |
no |
5s |
Delay before applying a detected rebalance. Ignored (forced to 0s) when membership is dynamic. |
dcp.group.membership.config |
map[string]string |
no |
*not set |
Key-values for couchbase membership: expirySeconds (120), heartbeatInterval (5s), heartbeatToleranceDuration (15s), monitorInterval (10s), watchInterval (1s), timeout (10s). |
dcp.config.disableChangeStreams |
bool |
no |
false |
Set true to disable change history streams on Couchbase Server 7.2.0+ Magma buckets. |
dcp.config.includeXattrs |
bool |
no |
false |
Set true to include Couchbase Extended Attributes (XATTRs) on DcpMutation and DcpDeletion events (event.Xattrs). XATTR framing is automatically stripped so event.Value always holds only the clean document body. |
dcp.config.noValue |
bool |
no |
false |
Set true to open DCP streams with memd.DcpOpenFlagNoValue (key-only mode), omitting document bodies on the wire for cache invalidation or key-index connectors. |
dcp.config.disableCompression |
bool |
no |
false |
Set true to disable Snappy wire compression on the DCP connection (enabled by default). Both compressed and uncompressed packets are decoded cleanly across XATTR and non-XATTR modes. |
dcp.config.enableOSOBackfill |
bool |
no |
false |
Set true to negotiate Out-of-Sequence-Order (OSO) backfills (enable_out_of_order_snapshots=true_with_seqno_advanced) on Couchbase Server 7.1.0+ persistent buckets. Speeds up initial backfills of small collections; items arrive out of seqNo order and checkpoints only advance once each OSO snapshot completes. |
dcp.config.priority |
string |
no |
low |
DCP stream priority requested from Couchbase: low, medium, or high. Maps to gocbcore DcpAgentPriority (set_priority DCP control). |
leaderElection.enabled |
bool |
no |
false |
Set true for kubernetesHa membership. |
leaderElection.type |
string |
no |
kubernetes |
Leader election implementation (kubernetes). |
leaderElection.config |
map[string]string |
no |
*not set |
Key-values for kubernetes leader election: leaseLockName (required), leaseLockNamespace (required), leaseDuration (8s), renewDeadline (5s), retryPeriod (1s). Requires leaseDuration > renewDeadline > retryPeriod. |
leaderElection.rpc.port |
int |
no |
8081 |
gRPC bi-directional stream port used by leader/follower service discovery in kubernetesHa membership. |
leaderElection.rpc.tls.enabled |
bool |
no |
false |
Enable TLS on the leader/follower gRPC bi-directional stream. |
leaderElection.rpc.tls.certPath |
string |
no |
*not set |
PEM certificate path for the gRPC server (and for client authentication in mTLS when set). Required when leaderElection.rpc.tls.enabled is true. |
leaderElection.rpc.tls.keyPath |
string |
no |
*not set |
PEM private key path matching certPath. Required when leaderElection.rpc.tls.enabled is true. |
leaderElection.rpc.tls.caPath |
string |
no |
*not set |
Optional CA PEM bundle path for verifying the leader certificate on clients and follower client certificates when clientAuth is true. |
leaderElection.rpc.tls.serverName |
string |
no |
*not set |
Optional TLS server name override (SNI / SAN verification when dialing pods by IP). |
leaderElection.rpc.tls.clientAuth |
bool |
no |
false |
Require and verify client certificates (mutual TLS / mTLS) on the gRPC server. |
leaderElection.rpc.tls.insecureSkipVerify |
bool |
no |
false |
Skip server certificate verification on the gRPC client (development/testing only). |
checkpoint.type |
string |
no |
auto |
Checkpoint commit mode: auto (periodic background saves) or manual (via ctx.Commit() / connector.Commit()). |
checkpoint.autoReset |
string |
no |
earliest |
Starting position when no checkpoint exists for a vBucket: earliest (seqNo 0), latest (current high seqNo), timestamp (seeks past events before checkpoint.startTime while advancing checkpoints), or offsets (seeds from checkpoint.initialOffsets). |
checkpoint.startTime |
time.Time |
no |
*not set |
Required when checkpoint.autoReset is timestamp (RFC3339). Events earlier than startTime are skipped while advancing vBucket checkpoints so restarts do not rescan skipped history. |
checkpoint.initialOffsets |
map[uint16]CheckpointOffset |
no |
*not set |
Required when checkpoint.autoReset is offsets. Per-vBucket starting coordinates (seqNo, optional vbUUID, startSeqNo, endSeqNo); omitted vbUUID is resolved from Couchbase failover logs automatically. |
checkpoint.interval |
time.Duration |
no |
1m |
Auto-checkpoint flush interval. |
checkpoint.timeout |
time.Duration |
no |
1m |
Timeout for loading, saving, and clearing checkpoints in Couchbase metadata. |
checkpoint.rollbackToZeroWhenCorrupted |
bool |
no |
false |
When true, if any assigned vBucket checkpoint is corrupted (unparseable JSON, missing fields, BucketUUID mismatch, invalid snapshot range, seqNo > 0 with vbUUID == 0, or seqNo > latestSeqNo), rolls all assigned vBuckets back to seqNo 0 and persists clean zero checkpoints. |
healthCheck.disabled |
bool |
no |
false |
Disable periodic Couchbase connection health checks and the GET /status API endpoint. |
healthCheck.interval |
time.Duration |
no |
1m |
Periodic Couchbase connection health check interval. |
healthCheck.timeout |
time.Duration |
no |
1m |
Couchbase connection health check timeout. |
rollbackMitigation.disabled |
bool |
no |
false |
Disable proactive persisted-seqNo rollback mitigation. Automatically disabled at runtime for ephemeral buckets. |
rollbackMitigation.interval |
time.Duration |
no |
1s |
Persisted sequence number (ObserveVb) polling interval. |
rollbackMitigation.configWatchInterval |
time.Duration |
no |
10s |
Cluster topology config watch interval for rollback mitigation. |
metadata.type |
string |
no |
couchbase |
Metadata storage backend: couchbase, file, or noop. Couchbase metadata bounds concurrent KV ops and materializes only dirty vBuckets during saves. |
metadata.readOnly |
bool |
no |
false |
Wraps metadata in a read-only adapter so checkpoints are loaded but never written (useful for debugging). |
metadata.config |
map[string]string |
no |
*not set |
For couchbase: hosts, username, password, bucket, scope, collection, maxQueueSize (2048), maxConcurrency (64), connectionBufferSize (5mb x Node Count), connectionTimeout (1m), secureConnection, rootCAPath. For file: fileName. |
api.disabled |
bool |
no |
false |
Disable the HTTP API server (metrics, health, rebalance, membership, and debug endpoints). |
api.port |
int |
no |
8080 |
HTTP API listen port (0..65535). Multiple go-dcp instances in the same process configured with the same port share a single HTTP server and /metrics endpoint. |
metric.path |
string |
no |
/metrics |
Prometheus metrics endpoint path. |
metric.labels |
map[string]string |
no |
*not set |
Optional custom Prometheus constant labels attached to every metric of this instance (valid Prometheus label names, not starting with __). Merged with default bucket and group labels. |
logging.level |
string |
no |
info |
Logging level (trace, debug, info, warn, error) using standard library log/slog JSON output. Ignored if a custom *slog.Logger is installed via NewDcpWithLogger, NewTypedDcpWithLogger, or logger.Set. |