What this API does
The Apache Kafka REST Proxy API allows developers to access Apache Kafka clusters via a RESTful HTTP interface. This enables producers and consumers to send messages and manage topics without the need for native Kafka clients. Supports multiple data formats, including JSON and Avro, enhancing versatility across programming environments.
How it works
Developers can utilize standard HTTP methods such as POST for producing messages and GET for consuming messages. Messages can be formatted in JSON or Avro, which simplifies integration into web applications and microservices. By providing straightforward endpoints, the API streamlines the process of event-driven data streaming.
Authentication
The API supports authentication via basic auth, requiring username and password credentials for access. This is critical for ensuring secure communication with Kafka clusters.
Example usage
/topics/- Retrieves information about a specific topic./topics/- Lists the partitions of a specified topic./partitions /topics/- Sends a message to the specified topic./produce /consumers/- Consumes messages from a specified consumer group./instances/ /messages /consumers/- Creates a new consumer instance for consuming messages./instances
Limits
Currently, the documented limits include a free tier on Confluent Cloud, which allows for 500,000 records per month. Specific rate limits for self-hosted instances are not documented and can depend on configuration.
Ideal use cases
- Integrating Kafka into cloud-native applications.
- Building microservices that require real-time data streaming.
- Enabling RESTful access to Kafka for platforms without native client capabilities.
- Facilitating data processing pipelines across distributed systems.