Author |
Message
|
sieijish |
Posted: Mon Apr 24, 2006 7:24 am Post subject: Access <psc> folder from JMS |
|
|
Acolyte
Joined: 29 Nov 2004 Posts: 67 Location: London
|
Hello,
Is there a way to access <psc> folder contents from the JMS API?
I have a SCADA client that publishes a message and the id of the client is contained in psc.publishClientID filed.
Message Broker publishes the message received from the SCADA node and when the JMS Subscriber receives the message, it has to figure out the publishClientID
Regards,
Sieijish Dominic |
|
Back to top |
|
 |
wschutz |
Posted: Mon Apr 24, 2006 12:47 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
sieijish |
Posted: Tue Apr 25, 2006 4:18 am Post subject: |
|
|
Acolyte
Joined: 29 Nov 2004 Posts: 67 Location: London
|
Since IBM JMS library is parsing the RFH2 header, it definetly has this information, but what i don't know is whether is exposing this via some IBM specific API. I can cast the class to the IBM specific class and call the API
It seems that mapping information to JMS properties is the only way to get the information via JMS API and as per the mapping documentation, there is no standard mapping for this property. |
|
Back to top |
|
 |
briancop |
Posted: Tue Apr 25, 2006 11:22 pm Post subject: |
|
|
 Apprentice
Joined: 04 Apr 2005 Posts: 28 Location: Hursley, UK
|
The JMS code does parse the RFH2, but in doing so it extracts the info it understands and presents it via the JMS API as header fields and properties, and ignores anything it doesn't understand. So in the current implementation of JMS, you cannot access the contents of folders like <psc>. If you really need access to this, then JMS is not the right API for you; perhaps MQ Classes for Java, although that may cause other issues for you, like having to rewrite your subscriber app with an API that is great for point-point but doesn't make pub/sub anything like as easy as JMS?
The only other way I can think of to do this is some kind of message transformation in the broker to extract the info you need and put it into a property in the <usr> folder so that JMS can get at it. But I'm not a broker expert so couldn't advise you exactly how to do this transformation. |
|
Back to top |
|
 |
sieijish |
Posted: Wed Apr 26, 2006 12:24 am Post subject: |
|
|
Acolyte
Joined: 29 Nov 2004 Posts: 67 Location: London
|
Thanks briancop for your comments.
I wanted to confirm that there is no way to access <psc> folder from JMS before going down the <usr> folder route. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 26, 2006 2:42 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sieijish wrote: |
Thanks briancop for your comments.
I wanted to confirm that there is no way to access <psc> folder from JMS before going down the <usr> folder route. |
Well yes and no. You have to realize that some of the information in the psc folder is accessed in a complete different way:
Code: |
TopicSubscriber mysubscriber = Session.createTopicSubscriber(Topic);
mymessage = mysubscriber.receive(long);
|
You can now invoke some methods on the subscriber to get information like subscriber.getTopic etc...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|