Author |
Message
|
nz1g9j |
Posted: Thu Aug 09, 2007 12:29 pm Post subject: MQ Message Expiration |
|
|
Newbie
Joined: 02 Jun 2007 Posts: 7 Location: Detroit
|
I have a requirement to set the TTL value on a message using JMS API. Everything is working fine with that. I'm wondering what is happening to the expired messages. Is't recoverable? It's not written to the Dead letter queue. Is there any way to configure a queue to automatically empty the expired messages to a different queue for reporting purposes? Responses are greatly appreciated.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 09, 2007 12:38 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The only thing you can do to "recover" expired messages is set report options that will send you a copy of the full data when a message expires.
This may be a bit tricky to do in pure JMS. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 09, 2007 4:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You'll have to use the JMSX_IBM properties for reporting. Look it up in the Using Java manual...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 09, 2007 5:20 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
fjb_saper wrote: |
You'll have to use the JMSX_IBM properties for reporting. Look it up in the Using Java manual...  |
Does that count as "pure JMS" these days? I never know. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
nz1g9j |
Posted: Fri Aug 10, 2007 6:04 am Post subject: |
|
|
Newbie
Joined: 02 Jun 2007 Posts: 7 Location: Detroit
|
Thank you both for your suggestions. I went through the Using Java documentation. It talks about some report options on discard and setting the JMSReplyTo Queue options to get the reports.
What I am looking for is to get a copy of the message and send it to a different queue for reporting on expiration due to TTL. Is there any configuration setting available either at the Queue level or at the Queue Manager level to achieve this?
Your responses are greatly appreciated.
Thanks.
nz1g9j |
|
Back to top |
|
 |
EddieA |
Posted: Fri Aug 10, 2007 10:48 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
nz1g9j wrote: |
Is there any configuration setting available either at the Queue level or at the Queue Manager level to achieve this? |
No. This is all Application level.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 10, 2007 7:01 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
fjb_saper wrote: |
You'll have to use the JMSX_IBM properties for reporting. Look it up in the Using Java manual...  |
Does that count as "pure JMS" these days? I never know. |
No it is provider specific JMS properties hence JMSX_IBM....
Is it pure JMS => sure. Is it provider independent? No.
Each provider may chose to implement this functionality in a different way and as such some functions are provider specific...
Good thing/Bad thing.... somewhere you'll have to balance for your own organization and its needs...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
nz1g9j |
Posted: Thu Aug 16, 2007 8:24 am Post subject: |
|
|
Newbie
Joined: 02 Jun 2007 Posts: 7 Location: Detroit
|
Thank You all for the suggestions. I could able to successfully transfer the messages on expiration to a different queue using the report option.
If anybody is interested this is what I have in my JMS client API.
MQQueue replyQ = (MQQueue) session.createQueue("queue:///Q2");
JMSTextMessage message = (JMSTextMessage) session.createTextMessage("SimplePTP "+ uniqueNumber);
message.setJMSReplyTo(replyQ);
message._setJMSIBMReportExpirationFromInt(MQC.MQRO_EXPIRATION_WITH_FULL_DATA);
sender.setTimeToLive(60000);
sender.send(message);
Thanks and Regards
nz1g9j javascript:emoticon(' ') |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 16, 2007 11:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
nz1g9j |
Posted: Fri Aug 24, 2007 9:01 am Post subject: |
|
|
Newbie
Joined: 02 Jun 2007 Posts: 7 Location: Detroit
|
As I stated in my previous posting everything is successful except that there is a time delay in transferring the messages to the report queue after expiration. It appears like a daemon task in MQ is up and running at specified intervals to look for the expired messages and move the messages to the report queue.
Can somebody help me in identifying that task and also any configurable options available to execute that task more frequently?
I appreciate your responses
Thanks
nz1g9j. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 24, 2007 10:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There are no configurable options. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 24, 2007 1:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you need it executed more frequently you can set a "browse" job on the original destination queue at requested intervals.... at your own risk!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Aug 24, 2007 4:04 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
nz1g9j wrote: |
Can somebody help me in identifying that task and also any configurable options available to execute that task more frequently?
|
You didn't mention what platform your QM is on. If its a mainframe QM, you're in luck. You can set something called Expiry Interval at the QM level, but only on z/OS. It determines how often the internal Expiry Scavengar runs.
Otherwise like fjb_saper said you'll have to set up some dummy utility app to browse your queue looking for Correl ID "This-Correl-ID-Cant-Possibly-Exist" every x seconds, where x is the longest you want to wait for an Expiry Report.
You would have to do it on z/OS also if your queue was not always open. That Scavengar only looks at "loaded" queues, meaning if the queue is not open by something, anything, the scavengar skips it, even if you set Expiry Interval to x seconds. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
nz1g9j |
Posted: Mon Aug 27, 2007 5:28 am Post subject: |
|
|
Newbie
Joined: 02 Jun 2007 Posts: 7 Location: Detroit
|
Thank you all for the responses.
I'm doing this POC in WinXP and eventually migrate everything to HP-UX. If there is a configurable Scavenger available for MQ in Z/OS, there may be one in other platforms too.
My MQ version is 6.0.2.1
Thanks and Regards
nz1g9j |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 27, 2007 8:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nz1g9j wrote: |
If there is a configurable Scavenger available for MQ in Z/OS, there may be one in other platforms too.
My MQ version is 6.0.2.1
|
Not in this version. The z/OS MQ has always had features not found on the distributed platforms. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|