Author |
Message
|
atheek |
Posted: Sun Nov 11, 2007 9:49 pm Post subject: Setting MQ Expiration |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Hi all,
Is there any way to set expiry on messages , by configuring queue definitions or using the jms objects? The application that sends messages to us doesnt set the expiry. But we dont want to process any messages that has arrived after "x" seconds. Our application ignores these messages, but it will get piled up in the local queue. We dont want this to happen.
thnx,
Atheek |
|
Back to top |
|
 |
Gaya3 |
Posted: Sun Nov 11, 2007 11:49 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 12, 2007 1:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I think the poster is aware of the Expiry field - the question is not how do you set it in the putting application, but can it be set using queue objects. The answer to this is of course no. Do try and post links of greater relevance.
If you're going to post links, post them to the IBM site not mirrors of unknown quality!
atheek - if your application is ignoring these messages (presumably by checking put date) why will they pile up in the input queue? Your application consumes them, ignores the contents because they're too old and gets on with the next thing. What's the problem?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Nov 12, 2007 10:06 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Vitor wrote: |
What's the problem? |
Performance suffers as the queue fills up with old messages.
Everything stops once the q does fill up! _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 12, 2007 11:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PeterPotkay wrote: |
Vitor wrote: |
What's the problem? |
Performance suffers as the queue fills up with old messages.
Everything stops once the q does fill up! |
What I meant was that if the application is ignoring messages more than "x" period of time it must be reading them to make this determination. If it's reading them, it can clear them.
This sounds like a simple solution to me....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Nov 12, 2007 12:01 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I see. I was thinking his app was a requestor and he was doing selective gets for the replies, which if they come back after x seconds he doesn't care and is no longer looking for them anyway, so they pile up.
Your thought process was that his app consumed each and every message that arrives, not matter how late it is. In which case if its to old just ignore it like you said and get on with business. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 12, 2007 12:22 pm Post subject: Re: Setting MQ Expiration |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
atheek wrote: |
Hi all,
Is there any way to set expiry on messages , by configuring queue definitions or using the jms objects? The application that sends messages to us doesnt set the expiry. But we dont want to process any messages that has arrived after "x" seconds. Our application ignores these messages, but it will get piled up in the local queue. We dont want this to happen.
thnx,
Atheek |
Yes you should be able to configure this on the queue's JNDI layer (JMS).
This however means that the application needs to use the defaults.
Any value set at the application level will override the JNDI layer....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
atheek |
Posted: Mon Nov 12, 2007 1:14 pm Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
yeh, I got the solution ... I can set the expiry field of q object using jmsadmin to achieve this...
Vitor,
my application will wait for the reply from the target application for "x" seconds and timesout if it doesnt receive any. The correlation is done using the message id. So if the response doesnt come from the target application after "x" seconds, the application doesnt care about that message any more...so eventually there is a possibility that message can get piled up on the queue if expiry is not set...
Many thanks to all for replying.
This forum really rocks..I havent seen any other tech forum as active as this one...kudos to all the MQ gurus.
cheers,
Atheek |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 12, 2007 6:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Atheek,
Just for the record, ideally the expiry should be set by the sending application. We all know this is not an ideal world...
As well typically the server application returns the message with the expiry that was set on the requesting message...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|