Retrieving messages from a JMS Topic via a Swing gui
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ivan_Phillips
Posted On:   Monday, May 19, 2003 08:44 AM

I have a simple java swing gui with a scrolling text area.


I am publishing messages to the topic via a small test jsp and I want to retrieve the messages via my java swing gui.


My question is Is it possible for me to retrieve messages from the Topic if the gui is not residing on the server?


Currently when I publish my messages to the topic, the objects are being stored, but when I try to retrieve them


I get nothing back from the topic. Should I be doing this differently?

Thanks

Re: Retrieving messages from a JMS Topic via a Swing gui

Posted By:   Nick_Maiorano  
Posted On:   Tuesday, May 20, 2003 06:09 PM

Ivan,



Yes it is absolutely possible to connect to a topic remotely. However, your gui must connect to the JNDI of the server which hosts the JMS topic.



If you are not getting anything from your topic, remember that messages are broadcast immediately to any connected subscriber (in your case, the subscriber is the gui). Messages are not stored so if your gui connects after the message has been published, you will miss it. You should consider using queues instead of topics which do store messages.



Just a hunch.

About | Sitemap | Contact