Adds getMessageByTopic.
Fixs bugs.