Skip to content

docs: update Kafka connection examples for BOOTSTRAP BROKER syntax#36163

Draft
jubrad wants to merge 2 commits intoMaterializeInc:mainfrom
jubrad:jubrad/kafka-privatelink-docs
Draft

docs: update Kafka connection examples for BOOTSTRAP BROKER syntax#36163
jubrad wants to merge 2 commits intoMaterializeInc:mainfrom
jubrad:jubrad/kafka-privatelink-docs

Conversation

@jubrad
Copy link
Copy Markdown
Contributor

@jubrad jubrad commented Apr 20, 2026

Summary

Depends on #36161. Merge that first.

  • Updates user-facing documentation to show the new BOOTSTRAP BROKER and MATCHING broker rules syntax for Kafka PrivateLink connections
  • Updates SQL examples in create-connection.md and create_connection.yml

Test plan

  • Verify docs render correctly

🤖 Generated with Claude Code

@jubrad jubrad force-pushed the jubrad/kafka-privatelink-docs branch 2 times, most recently from d148ddd to bd192ec Compare April 21, 2026 03:57
@jubrad jubrad force-pushed the jubrad/kafka-privatelink-docs branch 2 times, most recently from effe4f2 to bfb1f96 Compare April 21, 2026 04:13
Comment on lines +164 to +168
BROKERS (
MATCHING '*.use1-az1.*' USING AWS PRIVATELINK confluent_privatelink (AVAILABILITY ZONE = 'use1-az1'),
MATCHING '*.use1-az4.*' USING AWS PRIVATELINK confluent_privatelink (AVAILABILITY ZONE = 'use1-az4'),
MATCHING '*.use1-az6.*' USING AWS PRIVATELINK confluent_privatelink (AVAILABILITY ZONE = 'use1-az6')
),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confluent provides these as prefixes we should just suggest .*<prefix> for each AZ.

Also we should add a screenshot for how to grab that.

Comment on lines +152 to +155
1. Create the Kafka connection. The `BOOTSTRAP BROKER` does not need an
`AVAILABILITY ZONE` — Materialize will find the bootstrap broker across
availability zones. The `MATCHING` rules should specify `AVAILABILITY ZONE`
to route discovered brokers through their specific AZ endpoint.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to grab the AZs the brokers are deployed in as well. Confusingly this does not have to be where privatelink is enabled.

Comment on lines +175 to +177
The `MATCHING` patterns correspond to the AZ-specific DNS subdomains
from your Confluent Cloud networking settings. Adjust the patterns and
availability zones to match your cluster's configuration.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again we should just point to the prefix they provide. .*<prefix>

jubrad and others added 2 commits April 21, 2026 22:12
Introduces two new SQL constructs for Kafka PrivateLink connections:

- `BOOTSTRAP BROKER 'addr' USING AWS PRIVATELINK conn (...)` — provides
  the initial bootstrap address with an explicit PrivateLink tunnel. The
  bootstrap address is used as `bootstrap.servers` and the real hostname
  is preserved for correct TLS SNI.

- `MATCHING 'pattern' USING AWS PRIVATELINK conn (...)` inside `BROKERS`
  — pattern-based routing rules for dynamically discovered brokers.
  After the initial metadata fetch, Kafka returns broker addresses that
  may differ from the bootstrap address (e.g., AZ-specific hostnames).
  MATCHING rules route these through the correct PrivateLink endpoint.

This replaces the `AWS PRIVATELINKS` syntax which used exact-match
patterns for dual-purpose bootstrap/routing and a separate `TO` keyword
inconsistent with the existing `USING AWS PRIVATELINK` syntax.

Example:
```sql
CREATE CONNECTION kafka TO KAFKA (
    BOOTSTRAP BROKER 'lkc-825730.endpoint.cloud:9092'
        USING AWS PRIVATELINK pl_conn (AVAILABILITY ZONE 'use1-az1'),
    BROKERS (
        MATCHING '*use1-az1*' USING AWS PRIVATELINK pl_conn (AVAILABILITY ZONE 'use1-az1'),
        MATCHING '*use1-az4*' USING AWS PRIVATELINK pl_conn (AVAILABILITY ZONE 'use1-az4')
    ),
    SASL MECHANISMS 'PLAIN',
    SASL USERNAME 'key',
    SASL PASSWORD SECRET secret,
    SECURITY PROTOCOL 'SASL_SSL'
);
```

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updates user-facing documentation to show the new MATCHING broker rules
syntax for Kafka PrivateLink connections. Adds a PrivateLink tab to the
Confluent Cloud guide.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jubrad jubrad force-pushed the jubrad/kafka-privatelink-docs branch from bfb1f96 to df4288e Compare April 22, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant