cdc: separate schema and topic prefix for changefeed namespace
Is your feature request related to a problem? Please describe. When one kafka cluster is used for many changefeeds, with the same table name, the client cannot differentiate between changefeeds.
Describe the solution you'd like Change the namespace of the changefeed for the schema and topic. Add a flag (WITH option) where we’ll use fully qualified name (topic+schema) for given table rather than just table name. Default behavior is just table name.
Describe alternatives you've considered Should add schema prefix OR topic prefix as schema name -- fine with either Either:
- Prefix the schema namespace with what we use for topic namespace, or
- User can specify prefix used in both
Additional context Could also solve https://github.com/cockroachdb/cockroach/issues/28670
Hi @amruss, I've guessed the C-ategory of your issue and suitably labeled it. Please re-label if inaccurate.
While you're here, please consider adding an A- label to help keep our repository tidy.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.
Options for command UX
Option 1
CREATE CHANGEFEED FOR INTO ‘kafka://endpoint?topic_prefix=X&schema_prefix=Y’ WITH fully_qualified_name
Schema namespace:
<schema_prefix>.
Topic namespace:
<topic_prefix>.
Option 2
CREATE CHANGEFEED FOR INTO ‘kafka://endpoint?topic_prefix=X’ WITH fully_qualified_name
Schema namespace:
<topic_prefix>.
Topic namespace:
<topic_prefix>.
Option 3
CREATE CHANGEFEED FOR INTO ‘kafka://endpoint?topic_prefix=X&schema_prefix=topic_prefix’ WITH fully_qualified_name
Schema namespace:
<schema_prefix>.
Topic namespace:
<topic_prefix>.
Option 4
CREATE CHANGEFEED FOR INTO ‘kafka://endpoint?topic_and_schema_prefix=X’ WITH fully_qualified_name
Schema namespace:
<topic_and_schema_prefix>.
Topic namespace:
<topic_and_schema_prefix>.