docs: update Kafka connection examples for BOOTSTRAP BROKER syntax#36163
Draft
jubrad wants to merge 2 commits intoMaterializeInc:mainfrom
Draft
docs: update Kafka connection examples for BOOTSTRAP BROKER syntax#36163jubrad wants to merge 2 commits intoMaterializeInc:mainfrom
jubrad wants to merge 2 commits intoMaterializeInc:mainfrom
Conversation
d148ddd to
bd192ec
Compare
6 tasks
effe4f2 to
bfb1f96
Compare
jubrad
commented
Apr 21, 2026
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') | ||
| ), |
Contributor
Author
There was a problem hiding this comment.
Confluent provides these as prefixes we should just suggest .*<prefix> for each AZ.
Also we should add a screenshot for how to grab that.
jubrad
commented
Apr 21, 2026
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. |
Contributor
Author
There was a problem hiding this comment.
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.
jubrad
commented
Apr 21, 2026
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. |
Contributor
Author
There was a problem hiding this comment.
Again we should just point to the prefix they provide. .*<prefix>
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>
bfb1f96 to
df4288e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Depends on #36161. Merge that first.
BOOTSTRAP BROKERandMATCHINGbroker rules syntax for Kafka PrivateLink connectionscreate-connection.mdandcreate_connection.ymlTest plan
🤖 Generated with Claude Code