Not receiving text messages while playing

Sometimes while i'm playing games that require a bigger amount of memory i don't receive text messages at all or i receive them with a delay of 5-10 minutes, also when the phone is laggy i don't receive all of them. I think this problem is because of the message app (the stock one) is also laggy and can't receive the messages from the carrier. So, is there a fix for this or set a priority for the message app, if this is the cause?