update DiscardingOldMessages to v5