Environment:4paradigm OpenMLDB Kafka
| Knowledge Sources | |
|---|---|
| Domains | Streaming, Data_Ingestion |
| Last Updated | 2026-10-12 16:00 GMT |
Overview
Apache Kafka (or Pulsar) streaming broker environment for real-time data ingestion into OpenMLDB online tables via the ecosystem connector.
Description =
This environment provides the streaming data infrastructure for OpenMLDB's real-time feature engineering pipeline. Kafka (or Apache Pulsar) brokers feed data into OpenMLDB through the openmldb-ecosystem connector module. The connector subscribes to Kafka/Pulsar topics, parses incoming messages, and writes rows into OpenMLDB online tables. The demo Docker image includes Python packages (py4j, lightgbm, xgboost) needed for the streaming ML pipeline. The cluster is deployed with ./sbin/deploy-all.sh which includes ecosystem support.
Usage
Use this environment when building a real-time feature pipeline where streaming data sources feed into OpenMLDB for online feature computation. Required by the Kafka_Pulsar_Connector implementation.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux | Kafka broker and OpenMLDB cluster must be on same network |
| Hardware | 4GB+ RAM | Kafka broker requires dedicated memory |
| Disk | 50GB+ SSD | Kafka log retention and topic storage |
| Network | Low latency | Kafka broker to OpenMLDB tablet communication |
Dependencies
System Packages
java(JRE 11+) — Kafka runs on JVMpython3— for ecosystem connector and ML pipeline scripts
Streaming Platform
apache-kafka>= 2.8 (recommended) — or Apache Pulsar >= 2.8openmldb-ecosystem— OpenMLDB Kafka/Pulsar connector module
Python Packages
py4j== 0.10.9 — Python-Java bridge for ecosystemlightgbm== 3 — ML trainingxgboost== 1.4.2 — ML trainingtornado— async HTTP for prediction serversrequests— HTTP clientpandas== 1.5 — data manipulation
Credentials
No credentials required for basic Kafka setup. For secured deployments:
KAFKA_SASL_USERNAME/KAFKA_SASL_PASSWORD— SASL authentication (if enabled)KAFKA_SSL_KEY_PASSWORD— SSL encryption (if enabled)
Quick Install
# Install Kafka (quickstart)
curl -SLO https://archive.apache.org/dist/kafka/3.2.1/kafka_2.13-3.2.1.tgz
tar xzf kafka_2.13-3.2.1.tgz -C /work
cd /work/kafka_2.13-3.2.1
# Start ZooKeeper (Kafka requires ZK)
./bin/zookeeper-server-start.sh config/zookeeper.properties
# Start Kafka broker
./bin/kafka-server-start.sh config/server.properties
# Deploy OpenMLDB cluster with ecosystem support
cd /work/openmldb && ./sbin/deploy-all.sh
Code Evidence
Cluster deploy with ecosystem from `demo/init.sh:29-35`:
if [[ -e /work/openmldb/sbin ]]; then
export OPENMLDB_MODE=$MODE
if [[ "$MODE" = "standalone" ]]; then
python3 /work/taxi-trip/convert_data.py < /work/taxi-trip/data/taxi_tour_table_train_simple.csv > /work/taxi-trip/data/taxi_tour.csv
else
cd /work/openmldb && ./sbin/deploy-all.sh
fi
Python ML pipeline packages from `demo/Dockerfile:19`:
pip install --no-cache-dir py4j==0.10.9 lightgbm==3 tornado requests pandas==1.5 xgboost==1.4.2 numpy==1.26.4
OpenMLDB SDK installation from `demo/Dockerfile:34`:
pip install --no-cache-dir "openmldb==${OPENMLDB_VERSION}" "openmldb-tool"
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
Kafka broker not reachable |
Kafka not started or wrong address | Start Kafka: ./bin/kafka-server-start.sh config/server.properties
|
Topic not found |
Kafka topic not created | ./bin/kafka-topics.sh --create --topic <name> --bootstrap-server localhost:9092
|
Schema mismatch |
Kafka message schema does not match OpenMLDB table schema | Align connector schema mapping with table DDL |
py4j not found |
Missing Python-Java bridge | pip install py4j==0.10.9
|
Compatibility Notes
- Apache Pulsar: Also supported as an alternative to Kafka; configure Pulsar broker endpoint instead.
- Kafka without ZK (KRaft mode): Kafka 3.3+ supports KRaft mode; OpenMLDB cluster still requires its own ZooKeeper for coordination.
- Standalone mode: Streaming connectors are designed for cluster mode; standalone mode has limited streaming support.