Schema registry protobuf serialization

Hey folks, need help with a potential bug in protobuf serialization.

Confluent-kafka-go v1.9.2

  1. I am creating a go application where clients can send any message using the Any type field of protobuf.

  2. After converting the API input to protoreflect.ProtoMessage type using anypb.UnmarshalNew(doc.GetDetails(), proto.UnmarshalOptions{}), I am using protobuf.Serialize(topic, msg).

  3. This fails at s.toProtobufSchema(protoMsg) step with following error
    error interface conversion: *dynamicpb.Message is not desc.protoMessage: missing method Descriptor
    If I use a concrete type in protobuf.Serialize() which implements protoreflect.ProtoMessage type, serialization works.Kafka version and other details should not matter here since the code does not even reach those. It fails earlier itself.