Skip to content

Commit 6ab6b06

Browse files
authored
update comment (#69)
* update comment * adjust wording
1 parent 5ae70a4 commit 6ab6b06

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)