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

JMSTest

This example (JMSSubTest.Java) demonstrates how to subscribe to a JMS Topic. Before using this example with Nirvana you will need to create a topic factory and topic 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.JMSSubTest vegetta rates

This will connect you to the rates topic on the via vegetta. As messages are published to the rates topic this application automatically consumes them and dumps the contents to your screen.