Added methods to query messages from message store.