You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional fields, which are decorated with @AvroDefault annotation, can be added or deleted for all strategies other than ALWAYS_INCOMPATIBLE. The description "Modify optional fields" is confused and ambiguous and should be removed.
What issue do you find in Pulsar docs?
Currently Pulsar docs only shows a simple way to create Avro schema. See https://pulsar.apache.org/docs/next/schema-understand#usage.
Given the following
User
class:We can create an producer with Avro schema like:
However, if the class has a nullable field with a default value like:
We must create the Avro schema via a
SchemaDefinition
and disable thealwaysAllowNull
field like:Otherwise, the schema info would be invalid. Run following test to reproduce:
The 2nd creation of the producer will fail with following error messages:
What is your suggestion?
SchemaDefinition
.Do you have any references?
https://pulsar.apache.org/docs/next/schema-understand#usage
Would you like to fix this issue?
Yes
Note
The text was updated successfully, but these errors were encountered: