Search code examples
azureapache-kafkaapache-kafka-connectazure-eventhub

Can a Kafka connector be used with an Event Hub Broker?


I was listening to this talk, where it is told that Event Hub is compatible with the Kafka protocol and that if an app is writing or reading from Kafka topics, its possible to use an Event Hub broker in place of a Kafka broker.

But does that also mean that we can use Kafka connectors for Event Hub? For example, if I want to bring in data from a Postgres Database into a Kafka topic using a Postgres Kafka connector, can I simply change the broker address to that of an Event Hub broker to bring it into an Event Hub topic instead?


Solution

  • Yes, it is possible to use Kafka connectors with Azure Event Hubs endpoints. I am not knowledgeable about PostgreSQL connector configuration however I can point you this Kafka CLI sample - https://github.com/Azure/azure-event-hubs-for-kafka/tree/master/tutorials/connect. Probably, PostgreSQL connector is also configured similar to CLI connector.