dx-agent-stream-build-mqtt-kafka

Builds GStreamer pipelines that publish inference results to Kafka or MQTT brokers.

3|5|Updated Jan 21, 2025
One-click install
npx skills add https://github.com/DEEPX-AI/dx_stream --skill dx-agent-stream-build-mqtt-kafka-deepx-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dx-agent-stream-build-mqtt-kafka
Source: https://github.com/DEEPX-AI/dx_stream/tree/main/.deepx/skills/dx-agent-stream-build-mqtt-kafka
Command: npx skills add https://github.com/DEEPX-AI/dx_stream --skill dx-agent-stream-build-mqtt-kafka-deepx-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires kafka-python, paho-mqtt.

What problem does it solve? Connecting a DEEPX NPU vision inference pipeline to an external message broker requires correctly wiring DxMsgConv and DxMsgBroker elements, writing producer scripts, and building consumer clients, which is error-prone when done manually. ## Core Features & Use Cases - Kafka Producer Pipelines: Generates gst-launch-1.0 scripts that stream detection results as JSON to a Kafka topic, plus a Python Kafka consumer. - MQTT Publisher Pipelines: Generates MQTT publisher pipelines with a Python paho-mqtt subscriber for receiving inference messages. - Isolated Output Sessions: Creates all generated applications under timestamped dx-agent-dev/ session directories with session.json metadata and run scripts. - Use Case: A developer wants to stream YOLOv5 object detection results from a video file into a Kafka topic so a downstream analytics service can consume structured JSON detections in real time. ## Quick Start Ask the agent to build a broker pipeline that publishes YOLOv5 detection results to a Kafka topic named detections on localhost:9092.

Frequently Asked Questions about dx-agent-stream-build-mqtt-kafka

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish GStreamer inference results to Kafka?▼

Build a pipeline ending with dxmsgconv followed by dxmsgbroker configured with broker-name=kafka, a connection address, and a topic. DxMsgConv converts detection metadata to JSON and DxMsgBroker publishes it to the Kafka broker.

How do I send object detection results to an MQTT broker?▼

Use a pipeline with dxpreprocess, dxinfer, dxpostprocess, dxmsgconv, and dxmsgbroker with broker-name=mqtt and your broker address and topic. A paho-mqtt Python subscriber can then receive the JSON detection messages.

What is the difference between DxMsgConv and DxMsgBroker?▼

DxMsgConv converts inference metadata into JSON messages and must precede DxMsgBroker in the pipeline. DxMsgBroker is a terminal element with no source pad that transmits those messages to the configured Kafka or MQTT broker.

What Python dependencies are needed for the Kafka and MQTT consumers?▼

The Kafka consumer requires the kafka-python package installed via pip. The MQTT subscriber requires paho-mqtt, and a running broker such as Mosquitto or a Kafka container must be reachable at the configured address.

Where are generated broker pipeline files created?▼

All generated applications are created under dx-agent-dev/ in a timestamped session directory containing run scripts, consumer code, configuration files, and a session.json metadata file. Production directories are only used when explicitly requested.