I don't think that's related to the fact that your message is persistent or not.
Java Heap size error raises usually when you're injecting too many messages more than capacity of your heap sizes. Temporary you can increase the heap size, but I guess it's rather the problem of the internal data storage that
JBoss uses. It's more a development product rather than a product DB.
You should use more persistent DB instead.
Well, you check this in your code level not in Jboss. In your code, you set these, and your delivery mode would be persisten.
Maybe you mean Physical queue, so in that case by adding these lines
in nameOfYourService\deploy\jboss-messaging.sar
Hope I could answer your question.
Cheers,