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(
287
287
new KafkaAvroSchema('keySchema' , 9 /* , AvroSchema $definition */)
288
288
);
289
289
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);
293
294
294
295
$consumer = KafkaConsumerBuilder::create()
295
296
->withAdditionalConfig(
You can’t perform that action at this time.
0 commit comments