-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
hi
i was reading the document but I did not understand how to create a record and encode it according to the schema
$avro = AvroSchema::parse(file_get_contents('./schemas/user.avsc'));
$schemaRegistryClient=new CachedRegistry(
new PromisingRegistry(
new Client([
'base_uri'=>"registry.example.com"
])
),
new AvroObjectCacheAdapter()
);
$recordSerializer=new RecordSerializer($schemaRegistryClient,[
RecordSerializer::OPTION_REGISTER_MISSING_SCHEMAS=>false,
RecordSerializer::OPTION_REGISTER_MISSING_SUBJECTS=>false
]);
$record=[];//how to create record ??
$recordSerializer->encodeRecord('user_topic',$avro,$record);can anybody explain to me how to create record like in java SDK?
Metadata
Metadata
Assignees
Labels
No labels