From 0df97606a788cac3389c017430f5ba78ea5277fc Mon Sep 17 00:00:00 2001 From: Yang SiShuo Date: Tue, 16 May 2023 11:22:02 +0800 Subject: [PATCH] Add protobuf schema example --- example/descriptor-with-schemas.yaml | 5 +++++ example/schemas/test.proto | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 example/schemas/test.proto diff --git a/example/descriptor-with-schemas.yaml b/example/descriptor-with-schemas.yaml index 14fb38538..6c22ac7af 100644 --- a/example/descriptor-with-schemas.yaml +++ b/example/descriptor-with-schemas.yaml @@ -54,6 +54,11 @@ projects: config: replication.factor: "1" num.partitions: "1" + - name: "topic09" + dataType: "proto" + schemas: + value.schema.file: "schemas/test.proto" + value.format: "PROTOBUF" - name: "projectB" topics: - dataType: "avro" diff --git a/example/schemas/test.proto b/example/schemas/test.proto new file mode 100644 index 000000000..0e02db7d2 --- /dev/null +++ b/example/schemas/test.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package com.mycorp.mynamespace; + +message SampleRecord { + int32 my_field1 = 1; + double my_field2 = 2; +}