in core/src/main/java/org/apache/rocketmq/schema/registry/core/api/v1/SchemaController.java [535:554]
public GetSchemaResponse getSchemaByRecordId(
@ApiParam(value = "The cluster of the subject", required = true)
@PathVariable(value = "cluster-name") final String cluster,
@ApiParam(value = "The tenant of the schema", required = true)
@PathVariable(value = "tenant-name") final String tenant,
@ApiParam(value = "The name of the subject", required = true)
@PathVariable(value = "subject-name") String subject,
@ApiParam(value = "The recordId of the schema", required = true)
@PathVariable(value = "record-id") final String recordId
) {
long versionMask = ~(-1L << SchemaConstants.SCHEMA_VERSION_BITS);
long recordIdResource = Long.parseLong(recordId);
Long version = recordIdResource & versionMask;
QualifiedName qualifiedName = new QualifiedName(cluster, tenant, subject, null, version);
return this.requestProcessor.processRequest(
"getSchemaByRecordId",
() -> schemaService.getBySubject(qualifiedName)
);
}