I have a base class for Kafka events that inherited by specific DTO events classes related to a particular topic.
When I tried to filter Kafka events by RecordFilterStrategy parametrized with the base class I found out that I can't set up KafkaListenerContainerFactories parametrized with child DTO classes using this filter. I looked into the source code of the filter class and I figured out that the filter method doesn't use upper-bounded wildcard generic for ConsumerRecord so it means I can put only exactly the same type but not its successors.
It is better to use bounded generics to allow to put child classes.