ch-robinson / dotnet-avro

An Avro implementation for .NET
https://engineering.chrobinson.com/dotnet-avro/
MIT License
135 stars 51 forks source link

Add NodaTime example #291

Closed runerys closed 9 months ago

runerys commented 9 months ago

The issue https://github.com/ch-robinson/dotnet-avro/issues/222 requests a demonstration on how to enable NodaTime support. This PR constributes an example for schema generation, serialization and deserialization.

Note that

This PR is setup as a draft for now, since:

dstelljes commented 9 months ago

This ran successfully for me on the Docker Compose stack we have in the examples directory 👍

runerys commented 9 months ago

Ah, brilliant! 👌

I got up and running, but somehow the consumer don't get any assignments through consumer.Subscribe().

However, direct assignment worked fine: consumer.Assign(new TopicPartition(Topic, 0)); So, I also got it running (quite) successfully.

dstelljes commented 9 months ago

Huh, yeah, I recreated everything and got the same problem. Everything should still work if we remove the check and set auto.offset.reset to earliest; going with that for the other examples: https://github.com/ch-robinson/dotnet-avro/commit/5c95d0a8702e4bd140ee63107005888631fc8038

runerys commented 9 months ago

Thanks! I rebased my branch and updated the setting. Works now.