public int getSchemaIdFromSubject ( String subject ) throws SchemaRegistryException { try { SchemaMetadata metadata = registryClient . getLatestSchemaMetadata ( subject ) ; return metadata . getId ( ) ; } catch ( IOException | RestClientException e ) { throw new SchemaRegistryException ( e ) ; } }
Looks up schema id for the specified subject from the schema registry