File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -287,9 +287,10 @@ $registry->addKeySchemaMappingForTopic(
287287 new KafkaAvroSchema('keySchema' , 9 /* , AvroSchema $definition */)
288288);
289289
290- // if you are only decoding key or value, you can pass that mode as additional third argument
291- // per default both key and body will get decoded
292- $decoder = new AvroDecoder($registry, $recordSerializer /*, AvroDecoderInterface::DECODE_BODY */);
290+ // If you are only encoding / decoding key or value, only register the schema(s) you need.
291+ // It is advised against doing that though, some tools might not play
292+ // nice if you don't fully encode your message
293+ $decoder = new AvroDecoder($registry, $recordSerializer);
293294
294295$consumer = KafkaConsumerBuilder::create()
295296 ->withAdditionalConfig(
You can’t perform that action at this time.
0 commit comments