ThinhLe30 opened a new issue, #1188:
URL: https://github.com/apache/pulsar-client-go/issues/1188
I'm using Avro schema and here is the example code to create a producer and
consumer to send/receive messages:
```go
//Create producer and send message
producer, err := client.CreateProducer(pulsar.ProducerOptions{
Topic: "my-topic",
Schema: pulsar.NewAvroSchema(exampleSchemaDef, nil),
})
msgId, err := producer.Send(context.Background(), &pulsar.ProducerMessage{
Value: avroExampleStruct{
ID: 10,
Name: "avroExampleStruct",
},
})
//Create Consumer and receive a message
consumer, err := client.Subscribe(pulsar.ConsumerOptions{
Topic: "my-topic",
Schema: pulsar.NewAvroSchema(exampleSchemaDef, nil),
SubscriptionName: "my-sub",
Type: pulsar.Shared,
})
message, err := consumer.Receive(context.Background())
```
The thing is the `Schema` option is hard-code and what if the producer
changes the schema properties, then the consumer can not effect -> error. How
can I get a Schema Registry to save the schema using for both producer and
consumer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]