I referred the below github sample and to use Eventhub cluster Kafka as Output binding of Azure Event Hub function and the messages where sent to the Event Hub cluster kafka successfully, Make sure you go through the above github samples for more insights.
Created a sample Typescript Event Hub Function like below:-
I have used different Eventhub namespace in Input binding and Eventhub cluster kafka namespace as Output binding. You can use the same EventHub cluster with Kafka for Input and Output Binding:-
my index.ts:-
import { AzureFunction, Context } from "@azure/functions"
const eventHubTrigger: AzureFunction = async function (context: Context, eventHubMessages: any[]): Promise<void> {
context.log(`Eventhub trigger function called for message array ${eventHubMessages}`);
const responseMessage = 'Ok'
// context.bindings.outputKafkaMessage = eventHubMessages
eventHubMessages.forEach((message, index) => {
context.log(`Processed message ${message}`);
context.bindings.outputKafkaMessage = message
});
};
export default eventHubTrigger;
My function.json:-
{
"bindings": [
{
"type": "eventHubTrigger",
"name": "eventHubMessages",
"direction": "in",
"eventHubName": "ceventhub",
"connection": "cPolicy_EVENTHUB",
"cardinality": "many",
"consumerGroup": "$Default",
"dataType": "string"
},
{
"type": "kafka",
"direction": "out",
"name": "eventData",
"brokerList": "example_APPSETTING",
"topic": "topic",
"username": "$ConnectionString",
"password": "example_APPSETTING",
"protocol": "NOTSET",
"authenticationMode": "NOTSET"
}
],
"scriptFile": "../dist/EventHubTrigger1/index.js"
}

Sent a message to Event Hub by the sample code from here
Azure EventHub Trigger was successful, Refer below:-

Now, when I checked my EventHub Cluster with Kafka enabled, I got the request of these messages successfully, Refer below:-

In order to create EventHub Cluster with Kafka and consume messages, Refer this Document step by step.
Example with same EventHub cluster with Kafka:-
Index.ts remains same, My function.json:-
{
"bindings": [
{
"type": "eventHubTrigger",
"name": "eventHubMessages",
"direction": "in",
"eventHubName": "ev1",
"connection": "evhbnameosc43_RootManageSharedAccessKey_EVENTHUB",
"cardinality": "many",
"consumerGroup": "$Default",
"dataType": "string"
},
{
"type": "kafka",
"direction": "out",
"name": "eventData",
"brokerList": "example_APPSETTING",
"topic": "ev1",
"username": "$ConnectionString",
"password": "example_APPSETTING",
"protocol": "NOTSET",
"authenticationMode": "NOTSET"
}
],
"scriptFile": "../dist/EventHubTrigger1/index.js"
}