-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathavro_commands.txt
12 lines (8 loc) · 967 Bytes
/
avro_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
# Avro commands
Producer = kafka-avro-console-producer --broker-list localhost:9092 --topic test-avro --property schema.registry.url=http://127.0.0.1:8081 --property value.schema='{"type":"record", "name":"myrecord", "fields":[{"name":"f1", "type":"string"}]}'
# Incopatible 409 error can't evolve
Producer = kafka-avro-console-producer --broker-list localhost:9092 --topic test-avro --property schema.registry.url=http://127.0.0.1:8081 --property value.schema='{"type":"int"}'
# Evolve Producer
Producer = kafka-avro-console-producer --broker-list localhost:9092 --topic test-avro --property schema.registry.url=http://127.0.0.1:8081 --property value.schema='{"type":"record", "name":"myrecord", "fields":[{"name":"f1", "type":"string"}, {"name": "f2", "type": "int", "default": 0}]}'
# Avro Consumer
Consumer = kafka-avro-console-consumer --topic test-avro --bootstrap-server localhost:9092 --property schema.registry.url=http://127.0.0.1:8081 --from-beginning