cockroachdb / cockroachdb/docs

Document PubSub sink batching defaults (100 messages / 1 MiB / 10ms flush)

Open
#23,452 0 comments 0 reactions 1 assignee Claimed by @peachdawnleach View on GitHub
Dominant language
HTML
Stars
212
Forks
476
Avg merge
40m
Merged PRs (30d)
3

Description

## Summary

The [Pub/Sub sink configuration](https://www.cockroachlabs.com/docs/stable/changefeed-sinks.html#pub-sub-sink-configuration) table documents the following defaults for the flush fields:

| Field | Documented Default |
|---|---|
| `Flush.Messages` | `0` |
| `Flush.Bytes` | `0` |
| `Flush.Frequency` | `"0s"` |

However, the actual PubSub sink batching defaults are:
- Up to **100 messages** per batch
- Up to **1 MiB** per batch
- Flushed every **10ms**

This is a meaningful difference — the documented defaults suggest single-message (unbatched) behavior, which is inaccurate for PubSub. Note that Kafka and Webhook **do** default to single-message batches, so PubSub's behavior should be clearly distinguished.

The new no-linger batching sink also matches these PubSub defaults.

## What should be updated

- Correct the default values in the `pubsub_sink_config` field table on the [Changefeed Sinks](https://www.cockroachlabs.com/docs/stable/changefeed-sinks.html#pub-sub-sink-configuration) page
- Clarify that PubSub's defaults differ from those of Kafka and Webhook sinks

## Related

- [DOC-17404](https://cockroachlabs.atlassian.net/browse/DOC-17404) — Update changefeed default batching recommendations (general batching guidance; should be consistent with this fix)

Jira issue: DOC-17832

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.