Skip to content

Commit 2ebe21b

Browse files
Kafka schema examples
Kafka schema examples, one with an inline example and another with an authoritativeDefinitions reference to an external Kafka schema registry. Signed-off-by: Dirk Van de Poel <dirk.vandepoel@klarrio.com>
1 parent 66b46a3 commit 2ebe21b

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: v3.0.0
2+
kind: DataContract
3+
id: orders
4+
status: development
5+
name: Orders Event Stream
6+
version: 0.0.1
7+
schema:
8+
- name: Orders
9+
physicalName: orders
10+
logicalType: object
11+
physicalType: topic
12+
description: Orders Kafka topic
13+
properties:
14+
- name: cust_id
15+
businessName: Customer ID
16+
logicalType: string
17+
physicalType: string
18+
required: true
19+
- name: prod_id
20+
businessName: Product ID
21+
logicalType: string
22+
physicalType: string
23+
required: true
24+
- name: qty
25+
businessName: Quantity
26+
logicalType: integer
27+
physicalType: int
28+
required: true
29+
servers:
30+
- server: my-kafka
31+
type: kafka
32+
format: avro
33+
host: kafkabroker1:9092
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v3.0.0
2+
kind: DataContract
3+
id: orders
4+
status: production
5+
name: Orders Event Stream
6+
version: 0.0.1
7+
schema:
8+
- name: Orders
9+
physicalName: orders
10+
logicalType: object
11+
physicalType: topic
12+
description: Orders Kafka topic
13+
authoritativeDefinitions:
14+
- url: https://schema-registry:8081
15+
type: implementation
16+
servers:
17+
- server: my-kafka
18+
type: kafka
19+
format: avro
20+
host: kafkabroker1:9092

0 commit comments

Comments
 (0)