opensearch-project / opensearch-project/data-prepper

Support Protobuf with Confluent Schema Registry in the Kafka source

Open
#7,121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

untriaged
Dominant language
Java
Stars
374
Forks
355
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.

The Kafka source supports Confluent Schema Registry but currently selects schema-aware deserializers only for Avro and JSON Schema. When the registry reports a PROTOBUF schema, the source falls back to StringDeserializer.

Confluent Protobuf records use a binary wire format containing a schema ID and message indexes, so they cannot be decoded as strings or converted into structured Data Prepper events.

Describe the solution you'd like

Add Confluent Protobuf support to the Kafka source:

  • Detect PROTOBUF schema types from the configured <topic>-value subject.

  • Deserialize records using KafkaProtobufDeserializer.

  • Support schemas dynamically using the returned DynamicMessage, without requiring generated Java classes.

  • Convert messages through the canonical ProtoJSON representation into Data Prepper events.

  • Preserve existing Avro, JSON Schema, and plaintext behavior.

Describe alternatives you've considered (Optional)

Producers could republish events as Avro or JSON Schema, or an external consumer could decode Protobuf and forward JSON to Data Prepper. Both approaches add infrastructure and duplicate functionality already available through Confluent Schema Registry.

Additional context

A prototype has been validated with:

  • Unit coverage using Confluent’s mock Schema Registry client.

  • A local Docker environment containing Kafka and Confluent Schema Registry.

  • A registered Proto3 schema and records produced with Confluent’s Protobuf console producer.

  • A locally built Data Prepper image successfully consuming the records and writing structured NDJSON events.

  • Existing Kafka plugin unit tests and Checkstyle passing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Kafka source's schema-type selection and existing Kafka plugin unit tests; use Confluent's mock Schema Registry client to reproduce a PROTOBUF subject. Trace the returned DynamicMessage through ProtoJSON conversion, while preserving Avro, JSON Schema, and plaintext behavior. Done means Protobuf records produce structured Data Prepper events and the existing tests plus Checkstyle pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, kafka
Domain
backend, data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.