Hi, We are using Avro heavily for schema definition of all of the events sent through our distributed system. The system is a multi service, java based, SaaS system, where the services upgraded a lot and in no particular order. We are using Enums in some events data and from time to time a new Enum value is added. In this case we started having problems. A producer produce an event with the new enum value, A consumer using old schema tries to read the event using java SpecificDatumReader will completely fail to read the event . These events will not be handled by the consumer until it is upgraded to use the new schema generated code.
Problem is Avro code generation creates a real java enum, and there is no way to initialize or represent an unknown enum value in a java enum. However in many cases the consumer could still be doing most of its logic with the event with unknown enum value. Handling enums in Avro is a powerful tool, specificDatumReader is a powerful tool, it looks like I'd have to give up usage of one of them! Is there any plan/way to handle enums differently in the code generation? Any other ideas I can fix this issue with? I believe AVRO-1340 reference the same problem, any plans on doing it? I would go a step further and allow dynamic access to the original value, not just a default value in case enum value is unknown. 10x Amihay