I am running ActiveMQ 5, I am sure that "STOCKS.SUNW" topic is sending out messages, then how could I subscribe this topic and get the published message ?
I have tried this coding, but I get the error as bottom. Where is the bug ?
Thanks.
////////////////////////// Exception ///////////////////
Exception in
thread "main" javax.naming.NameNotFoundException: STOCKS.SUNW
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:225)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.Test.main(Test.java:31)