Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:4paradigm OpenMLDB Kafka

From Leeroopedia
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 JVM
  • python3 — for ecosystem connector and ML pipeline scripts

Streaming Platform

  • apache-kafka >= 2.8 (recommended) — or Apache Pulsar >= 2.8
  • openmldb-ecosystem — OpenMLDB Kafka/Pulsar connector module

Python Packages

  • py4j == 0.10.9 — Python-Java bridge for ecosystem
  • lightgbm == 3 — ML training
  • xgboost == 1.4.2 — ML training
  • tornado — async HTTP for prediction servers
  • requests — HTTP client
  • pandas == 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.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment