@@ -237,7 +237,7 @@ public override async Task<byte[]> SerializeAsync(T value, SerializationContext
237237
238238 if ( latestSchema != null )
239239 {
240- schemaId = new SchemaId ( SchemaType . Protobuf , latestSchema . Id , latestSchema . Guid ) ;
240+ schemaId = new SchemaId ( SchemaType . Protobuf , latestSchema . Id , latestSchema . Guid , indexArray ) ;
241241 }
242242 else if ( ! subjectsRegistered . Contains ( subject ) )
243243 {
@@ -259,7 +259,7 @@ await RegisterOrGetReferences(value.Descriptor.File, context, autoRegisterSchema
259259 // note: different values for schemaId should never be seen here.
260260 // TODO: but fail fast may be better here.
261261
262- schemaId = new SchemaId ( SchemaType . Protobuf , outputSchema . Id , outputSchema . Guid ) ;
262+ schemaId = new SchemaId ( SchemaType . Protobuf , outputSchema . Id , outputSchema . Guid , indexArray ) ;
263263 subjectsRegistered . Add ( subject ) ;
264264 }
265265 }
@@ -282,8 +282,6 @@ await RegisterOrGetReferences(value.Descriptor.File, context, autoRegisterSchema
282282 . ConfigureAwait ( continueOnCapturedContext : false ) ;
283283 }
284284
285- schemaId . MessageIndexes = indexArray ;
286-
287285 var buffer = new byte [ value . CalculateSize ( ) ] ;
288286 value . WriteTo ( buffer ) ;
289287 buffer = await ExecuteRules ( context . Component == MessageComponentType . Key ,
0 commit comments