cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.51k stars 3.7k forks source link

cdc: add param for schema registry to specify the subject name #115776

Open fabiog1901 opened 7 months ago

fabiog1901 commented 7 months ago

When creating a changefeed that uses Schema Registry and a specific topic, CRDB queries for the key schema using the table name as the subject instead of the topic_name specified in the changefeed.

create changefeed for table table1
into
  'kafka://kfk:9092?topic_name=topic1'
with
  format = avro,
  confluent_schema_registry = 'https://sr:8081/';

This will result in a HTTP POST call to this endpoint:

Post: 'https://sr:8081/subjects/table1-key/versions'

instead of

Post: 'https://sr:8081/subjects/topic1-key/versions'

This request is to be able to pass a parameter to specify the Schema Registry subject name independently of topic or table name.

Slack

Jira issue: CRDB-34206

gz#19626

blathers-crl[bot] commented 7 months ago

cc @cockroachdb/cdc