What would be the best way to get messages of different topics(with time-synchronization))
I have to parse desired topics and get messages for a topic using time synchronization. I have been asked to clear all data-structures.
My understanding of this is, as we pass the topic name as the input argument, I am writing a callback that will publish the message relevant to the topic passed as the input argument. What kind of a data structure should I use?
Method: Create a class that has functions to a)parse the topic name, b)get corresponding messages, c) Other functionalities like time synchronization. Clear the object of this class after every publication.
What are your reviews on this? Am I missing something?