File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JMS publisher-subscriber model scenario Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS publisher-subscriber model scenario " Watch "JMS publisher-subscriber model scenario " New topic
Author

JMS publisher-subscriber model scenario

Sindhu Kodoor
Ranch Hand

Joined: Sep 03, 2010
Posts: 65
Hi,

I have a requirement , which goes like this :

1. Publisher sends to the topic , xml messages

2. The QPID Broker will help the subscribers , subscribed to that topic with the xml message notification



But this is just a notification given to the subscriber saying that there is message consumed, right?

How do we get the actual message ( XML ) file, I have used to to write the contents of the xml file message into a local directory. Please help me out
Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 193

your 'textMessage' is the actual xml message which you received from topic.

you are creating notification message for some other validation purpose.

SCJP 5, SCWCD 5
Sindhu Kodoor
Ranch Hand

Joined: Sep 03, 2010
Posts: 65
But it does not provide me the xml data , do you have any examples to share?
Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 193

It will provide you a XML String. Which is text message.

Also when you want to read that XML you need to convert that byte stream of text message to the parser.
After parsing you will get the actual xml tags and values

you can see below links for examples

A JMS Client Examples

JMS, XML, and the heterogeneous enterprise
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JMS publisher-subscriber model scenario