Fix the problem of messages not being inserted in ES