ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS and Expiry

Post new topic  Reply to topic
 JMS and Expiry « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Mon Mar 23, 2015 11:56 am    Post subject: JMS and Expiry Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

This says JMSExpiration is mapped to the MQMD's Expiry field.
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q032010_.htm?lang=en

This says JMSExpiration is mapped to some field in the RFH2 called jms.Exp, and the MQMD Expiry column is blank.
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q032060_.htm?lang=en

This says its JMSExpiration to/from MQMD.Expiry
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q032030_.htm?lang=en


ugh. Why can't this be clear?

If a JMS app picks up an MQ Message, can it get the MQ Message's Expiry from the MQ message's MQMD, via the JMSExpiration field? Links #1 and #3 above seems to say yes, but Link #2 says no.

JMS - taking years off the lives of innocent MQ Admins the world over....
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 23, 2015 12:17 pm    Post subject: Re: JMS and Expiry Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 23, 2015 12:51 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Tue Mar 24, 2015 8:19 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

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
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 24, 2015 8:22 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 24, 2015 8:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS and Expiry
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.