Filtering, sorting, and limiting work for getEventsByTopic