* The default-handler is _NOT_ necessary, if the handler-methods only
consume the message itself.
* This looks like a bug in the automatic configuration:
* Without the addtional parameter of type `ConsumerRecordMetaData`, the
automatically created resolvers are able to consume the payload.
* After the addition of the `consumerRecordMetaData`-parameter, the
automatically created resolvers are empty and fail to resolve the
payload.
* After the addition of the default-handler, the required resolvers
are availabe again.
metadata.offset());
bars.add(bar);
}
+
+ @KafkaHandler(isDefault = true)
+ void handleUnknown(
+ @Payload Object unknown,
+ @Header(KafkaHeaders.RECORD_METADATA) ConsumerRecordMetadata metadata)
+ {
+ log.info(
+ "Received an unknown message: {}",
+ unknown,
+ metadata.topic(),
+ metadata.partition(),
+ metadata.offset());
+ }
}