Connect a Kafka client to Azure Event Hubs using the Kafka protocol endpoint
domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Ensure the Event Hubs namespace is on the Standard or Dedicated tier (the Kafka-compatible endpoint is not available on Basic)
Point bootstrap.servers at NAMESPACENAME.servicebus.windows.net:9093 (Event Hubs exposes the standard Kafka SSL port 9093) and ensure that port is not blocked by any firewall
For SASL/PLAIN auth, set security.protocol=SASL_SSL, sasl.mechanism=PLAIN, and sasl.jaas.config using PlainLoginModule with username='$ConnectionString' and password set to the namespace or Event Hub connection string
Alternatively configure SASL/OAUTHBEARER with an OAuthBearerLoginModule and a custom sasl.login.callback.handler.class for Azure AD token-based auth
Map each Kafka topic name to an existing Event Hub name (an Event Hub is the Kafka-protocol equivalent of a topic) — create the Event Hub first via the Azure portal/CLI
Use a standard Kafka client library (librdkafka, kafka-clients for Java, etc.) unmodified aside from the above connection configuration
Known gotchas
The Kafka endpoint requires Standard or Dedicated tier namespaces; Basic tier namespaces do not expose it
The connection string used as the SASL password must include the EntityPath if you scope it to a single Event Hub, or omit it to use a namespace-level shared access policy across all Event Hubs
Not every Kafka broker/topic-admin API is supported (Event Hubs emulates the Kafka protocol at the produce/consume level, but administrative operations like some topic configs may behave differently than a native Kafka broker) — verify any admin-client operations you depend on against current Event Hubs Kafka documentation
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?