Imessage over Wi-Fi sometimes not working?

My iphone won't send an imessage to anyones iphone all of a sudden. The Wi-Fi is connected. The sending bar will load then it just stops near the end and it says failed. Also i won't receive any messages and all of a sudden when it does work ill get a bunch of messages all at once. THis has been happening for over a month now! What's going on?

Ask apple for help