Also, you want to see the JMS specification to "roll" your own. See:
Java Message Service Specification-v1.1
In reply to Re: JMS in perl? by Khen1950fx in thread JMS in perl? by hackmare