- All of the Kafka features you’re used to: Ursa supports all the Kafka features you’re accustomed to, including KStreams, KSQL, KTables with Topic Compaction, Schema Registry for the Java Client, and Kerberos Authentication for Kafka Clients.
- Great developer experience: Ursa features streamlined local testing, with its own testcontainers module.
- Robust and reliable: Architecturally designed for scale and subjected to rigorous resilience testing. We’ve fortified Ursa through comprehensive testing, ensuring it meets and exceeds the demands of large-scale Kafka operations.
Prerequisites
To use the Kafka Protocol on StreamNative Private Cloud, ensure you are using image
streamnative/private-cloud:3.1.0.4 or later.Enable Kafka Protocol
To enable the Kafka protocol, update thePulsarBroker CR with the following configuration:
spec.config.protocolHandlers.kop.enabled: Required. Set totrueto enable the Kafka protocol.spec.config.transactionEnabled: Required. Set totrueto enable Kafka transaction support.
Verify Kafka Protocol
After enabling the Kafka protocol, verify that it’s working correctly.Get Service Endpoints
Retrieve the Kafka endpoints from the PulsarBroker status:- Kafka:
private-cloud-broker.pulsar.svc.cluster.local:9092
- Kafka TLS:
pulsar.example.com:9093
Test Kafka Connectivity
Test Within Kubernetes Cluster
Use a Kafka client pod within the cluster to test connectivity:Test Outside Kubernetes Cluster
If you deployed with Istio and configured external access, test from outside the cluster using TLS:- Create a
client-ssl.propertiesfile:
- Use Kafka console tools with TLS:
Advanced Configuration
Kafka-Specific Broker Settings
You can customize Kafka-specific settings through the PulsarBroker configuration:Topic Management
Kafka topics are automatically created as Pulsar topics. The default topic format is:Consumer Groups
Kafka consumer groups are mapped to Pulsar subscriptions. Each consumer group creates a corresponding subscription in Pulsar.Use Kafka with Authentication
If your Pulsar cluster has authentication enabled, you need to configure Kafka clients accordingly.With JWT Authentication
Configure Kafka clients to use SASL/PLAIN with JWT tokens:With OAuth2 Authentication
Configure Kafka clients to use SASL/OAUTHBEARER:Troubleshooting
Kafka Protocol Not Available
- Verify the Kafka protocol is enabled in the broker configuration:
- Check broker logs for Kafka-related errors:
- Ensure the broker pods have restarted after configuration changes:
Connection Refused or Timeout
- Verify network connectivity to the broker:
- If using Istio, check the Gateway and VirtualService:
- Verify the Istio Ingress Gateway is routing traffic correctly:
Authentication Failures
- Verify authentication is configured correctly in the broker:
- Check that the JWT token or OAuth credentials are valid
- Review broker logs for authentication errors:
Transaction Failures
- Verify transactions are enabled:
- Check transaction coordinator logs: