|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS and Expiry |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Mon Mar 23, 2015 11:56 am Post subject: JMS and Expiry |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Mar 23, 2015 12:17 pm Post subject: Re: JMS and Expiry |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PeterPotkay wrote: |
JMS - taking years off the lives of innocent MQ Admins the world over.... |
Hey, I was hating Java years before it was cool... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 23, 2015 12:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
@Peter,
Seemed you missed one link there:
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q032020_.htm?lang=en
You have to take this all with a grain of salt and consider the different implications:
For instance, what does your incoming /outgoing JMS message look like:
- JMS message with properties
- JMS message with RFH2
- JMS message with targetClient=1, in other words a plain MQMessage...
Maybe considering these 3 cases may help you understand the differences in mapping you may see.
Think about it this way: No matter how the expiry was set, if you use JMS you want to retrieve it using the JMS Property JMSExpiration i.e. using the getter and setter methods on the message property, like mymsg.getJMSExpiration()... or mymsg.setJMSExpiration(long) and not have to worry about which field in the MQMD or RFH is going to get populated...
Now if you can show of a message where the expiration was set with a non JMS API and JMS didn't pick up the expiration, or vice versa, that would be interesting and certainly worthy of a PMR...
The rest may be educational but is vastly irrelevant...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Mar 24, 2015 8:19 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Thank you for replying FJ. My little current problem is telling the JMS app to use the value of the MQ Expiry of the request message they pick up on the reply message they produce. I expected it be simple to just show them the link that says its this one JMS field that is mapped one-to-one to the MQMD.Expiry.
Then all this RFH2 header talk started up.....
Whether the message has an RFH2 header or not, can't / shouldn't the JMS app use JMSExpiration as it directly related to MQMD_Expiry?
And thanks Vitor for sharing the pain. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 24, 2015 8:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
No matter how the expiry was set, if you use JMS you want to retrieve it using the JMS Property JMSExpiration i.e. using the getter and setter methods on the message property, like mymsg.getJMSExpiration()... or mymsg.setJMSExpiration(long) and not have to worry about which field in the MQMD or RFH is going to get populated.. |
So, yeah, in their code they should get the JMSExpiration from the input message and set the JMSExpiration on the output message... possibly doing some subtraction between the two. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 24, 2015 8:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
PeterPotkay wrote: |
Whether the message has an RFH2 header or not, can't / shouldn't the JMS app use JMSExpiration as it directly related to MQMD_Expiry?
And thanks Vitor for sharing the pain. |
Yes it should.
The JMS programmer should only deal with the getJMSExpiration and setJMSExpiration methods of the javax.jms.Message. Like Jeff said, there may have to be some calculation in between to account for the processing time the JMS app used up...
Usually I think of that being relatively negligible... It might mean the message is not available, but if your processing time is below 1 sec and your max wait time is 1.5 or 2 seconds, who cares???  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|