This is archived documentation for an older version of Nirvana (v2.0). Please refer to documentation for the latest version if required.

JMSQSubTest

This example (JMSQSubTest.Java) demonstrates how to consume messages from a JMS Queue. Before using this example with Nirvana you will need to create a queue connection factory and queue using JMSAdmin.

Assuming you have used the default options with JMSAdmin and run the JMSAdmin example run the following command.

Java -DPRINCIPAL=anon -DPASSWORD=anon -DCONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory -DPROVIDER_URL=file:.com.pcbsys.Nirvana.nSpace.JMSQSubTest qvegetta movie

This will connect you to the movie queue via qvegetta. As messages to the movie queue are automatically consumed and then and dumped to your screen.