refactory IMessageStore.