Pass the object_type to JournalClient.value_serializer()
and make this function an (optional) constructor argument.
If not given, stick to kafka_to_value
.
This is needed in order to make it possible for the JournalClient to use a special value_deserializer implementation that needs the object_type, for example to make the value_deserializer directly instanciate BaseModel object.
This will be used by an upcoming refactoring of the storage replayer that will make sure any BaseModel object coming from the journal is valid, and log invalid kafka objects in case it's not.
Related to swh-storage#3693 (closed).
Depends on !205 (closed).
Migrated from D6565 (view on Phabricator)