+1 the byte schema should also abide by the schema compatibility strategy If I remember correctly, the byte schema should always compatible with string schema
Penghui On Tue, Mar 8, 2022 at 10:56 AM guo jiwei <techno...@apache.org> wrote: > Hi, > I want to discuss the compatibility issue with the byte schema here. > For now, the byte-schema is compatible with all other schemas. This may > introduce more issues. > Case 1: > 1. Consumer1 init with JSON schema for topic A. > 2. But producer1 init without schema and send byte messages > directly to topic A. > This will cause consumer1 to deserialize msg error. Also, > producer1 may send unsafe byte data. > > Case 2: > 1. Consumer1 init with byte schema for topic A. > 2. But producer1 init with AVRO/JSON schema and send messages to > topic A. > This will cause consumer1 don't know how to deserialize msg. > > To avoid the above issues, Byte schema should also follow the schema > compatibility policy. I'm open #13701 > <https://github.com/apache/pulsar/issues/13701> to track this. If the idea > is accepted, I will start a PIP. > > Please give some suggestions about this idea. > > > Regards > Jiwei Guo (Tboy) >