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