I have not been able to find this out, but is there a way to monitor how many messages were expired based on the retention policy? If not, JMX metrics like this would be very useful for my team. I would like to be able to filter this by topic and broker. Something like:
Additionally taking this one step further, it would be cool to be able to monitor how many messages a consumer group did not consume before they were expired.