• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to subscribe topic ?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!