Number of messages on Overview page isn't synced properly after topic compaction and doesn't match to number on Messages page
Describe the bug (Actual behavior)
There are 2 pages Overview and Messages where the number of a topic messages is shown.
After the topic's compaction, the number of messages isn't updated/synced on Overview page.
Please have a look at the screenshots below:

Expected behavior Those metrics should be synced as soon as possible and show an up-to-date value. Otherwise, it's confusing 🤔
Set up
Steps to Reproduce
- Create a topic with compact cleanup policy
- Produce some messages
- Have a look at the number of messages there
- Wait for topic compaction or trigger it manually
- Have a look at the number of messages on Overview and Messages pages. The numbers are not equal.
Screenshots
Additional context
I guess we need to update the metrics upon "compacting" a topic in case it's done manually
@Haarolean I would like to tackle this issue.
Related issue, if there are transactional messages, you get similar behavior where message count shows higher than the messages consumed since offsets are skipped for the transaction aborts and commits.
#4255 Feel free to raise one here: https://github.com/kafbat/kafka-ui