add code to support delete message from broker automatically.