You cannot use certificate-based authentication (client certificate) with the Kafka API for Azure Event Hubs. Azure Event Hubs supports authentication for the Kafka endpoint via:
Shared Access Signature (SAS) policies (using connection strings)
OAuth 2.0 with Microsoft Entra ID (using client credentials, managed identity, or federated credentials)
Certificate-based authentication is not supported for the Kafka endpoint in Azure Event Hubs. The use of SSL/TLS certificates in Azure Event Hubs is strictly for encryption in transit.
For your refence: https://learn.microsoft.com/en-us/azure/event-hubs/azure-event-hubs-apache-kafka-overview#security-and-authentication
Hope this helps. Do let us know if you any further queries.
Please remember to "Accept Answer" if answer helped you. This will help us as well as others in the community who might be researching similar questions.