Skip to content

Nullable Arrays #208

Closed Answered by dstelljes
kevanm asked this question in Q&A
Mar 7, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You should be able to make it work by passing a custom SchemaBuilder to AsyncSchemaRegistrySerializer:

var producer = new ProducerBuilder<SomeKey, SomeValue>(producerConfig)
    .SetValueSerializer(new AsyncSchemaRegistrySerializer(
        registryConfig,
        registerAutomatically: AutomaticRegistrationBehavior.Always,
        schemaBuilder: new SchemaBuilder(nullableReferenceTypeBehavior: NullableReferenceTypeBehavior.All)))
    .Build();

Alternatively, you could enable nullable reference types; the default behavior takes those annotations into account.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kevanm
Comment options

Answer selected by kevanm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants