Skip to content

Commit

Permalink
Merge pull request #4465 from jocelyndrean/sr-fix-duplicate-repro
Browse files Browse the repository at this point in the history
SR - fix the duplicate of mutiple event types in the same topic
  • Loading branch information
vdesabou authored Oct 17, 2023
2 parents 2b52e14 + c7f74b5 commit 23592e1
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 136 deletions.
3 changes: 1 addition & 2 deletions docs/content-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ There is also a Confluent Cloud version available [here](https://github.com/vdes

## 📝 Schema Registry
- [How to produce Avro records via kafka-avro-console-producer with Union](https://github.com/vdesabou/kafka-docker-playground/tree/master/schema-registry/kafka-avro-console-producer-union) ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)
- [Multiple event types in the same topic via Schema Registry API](https://github.com/vdesabou/kafka-docker-playground/tree/master/schema-registry/multiple-event-type-same-topic-api) ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)
- [Multiple Event Types in the Same Topic](https://github.com/vdesabou/kafka-docker-playground/tree/master/schema-registry/multiple-event-types-in-topic) ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)
- [How to use different Key and Value serializer with kafka-avro-console-producer](https://github.com/vdesabou/kafka-docker-playground/tree/master/schema-registry/use-diffrent-key-value-serializer-console-producer) ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)

## 👾 Other Playgrounds
Expand All @@ -337,7 +337,6 @@ There is also a Confluent Cloud version available [here](https://github.com/vdes
- 👻 Testing [KIP-108](https://cwiki.apache.org/confluence/display/KAFKA/KIP-108%3A+Create+Topic+Policy) [Create Topic Policy](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/create-topic-policy) ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)
- 📉 [Monitoring Demo](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/monitoring-demo) ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)
- 🕵️‍♀️ [Kafka Connect Sink Monitoring Demo](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/monitoring-sink-latency) Showcase different Kafka Connect Sink troubleshooting scenarios ![not tested](https://img.shields.io/badge/CI-not%20tested!-violet)
- 🎫 [Multiple Event Types in the Same Topic](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/multiple-event-types-in-topic) :other/multiple-event-types-in-topic:
- 👊 [Integrate syslogs to detect SSH failure connections](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/syslog-logstash-ksqldb) using Syslog source connector, LogStash and ksqlDB :other/syslog-logstash-ksqldb:
- 📶 [How to ensure high availability of LDAP using DNS SRV Records](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/ldap-authorizer-with-ldap-failover) :other/ldap-authorizer-with-ldap-failover:
- 🕹 [AVRO examples](https://github.com/vdesabou/kafka-docker-playground/tree/master/other/schema-format-avro) including a JAVA producer :other/schema-format-avro:
Expand Down
19 changes: 19 additions & 0 deletions schema-registry/kafka-avro-console-producer-union/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@
With Apache Avro, you can set a field as an UNION of two types. A union datatype is used whenever the field has one or more datatypes. For example, ["null", "string"] declares a schema which may be either a null or string.

Union type can be useful for Optional fields:
```
{
"type":"record",
"name":"myrecord",
"fields":[
{ "name":"id", "type":"int"},
{ "name":"product", "type":"string"},
{ "name":"quantity", "type":"int"},
{
"name":"description",
"type":[
"null",
"string"
],
"default":null
}
]
}
```

But it can be also useful for putting several Event Types in the same topic:
```
Expand Down
1 change: 0 additions & 1 deletion schema-registry/kafka-avro-console-producer-union/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ docker exec -i connect kafka-avro-console-consumer --bootstrap-server broker:909


# CASE 2 -> With Mutiple Event Types in the same Topic

log "Register the Avro schema for Customer"
# {
# "type": "record",
Expand Down
51 changes: 0 additions & 51 deletions schema-registry/multiple-event-type-same-topic-api/README.md

This file was deleted.

74 changes: 0 additions & 74 deletions schema-registry/multiple-event-type-same-topic-api/start.sh

This file was deleted.

8 changes: 0 additions & 8 deletions schema-registry/multiple-event-type-same-topic-api/stop.sh

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit 23592e1

Please sign in to comment.