Collect messages
I need to collect messages from a topic, that is, subscribe to a topic, and then do something with some condition about the message is met (a flag on the message) with all the messages recibed previously. Since the callbacks are functions (and well-made functions should't have state), I don't see a straightforward way to do this. So, what can I do?
Thanks