Author |
Message
|
niks29986 |
Posted: Sat Apr 04, 2015 3:56 pm Post subject: MQ Message Expiry RO with Full Data |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Hi All,
Appreciate your valueable responses on this forum!
I have a Mobile APP talking to backend MQ application via Message Broker.
Requirement is to convey the backend timeout to the mobile APP. Request messages are cached in cache MQ queues for response correlation.
I was looking at expiring MQ cache message RO with FULL Data to send the backend timeout response. But the default Expiry interval on Production queue managers is set to 5 mins and changing this default value is said to have impact on all the MQ objects performance on that Queue Manager.
Can you guys suggest some better approach to deal with this or provide some inputs on changing the expiry interval?
Kind Regards,
Nikhil |
|
Back to top |
|
 |
niks29986 |
Posted: Sat Apr 04, 2015 3:59 pm Post subject: |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Just to add, I have 30 sec timeout for backend call. If backend response does not come withing this time then cached message need to be used to comput the timeout response to front end (APP).
Any quick inputs on these lines are very much helpful. |
|
Back to top |
|
 |
nelson |
Posted: Sat Apr 04, 2015 4:30 pm Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
Hi niks29986, you need to deal with delayed responses from the backend, but as correlation messages are used to handle responses or timeouts you don't know how to correlate a delayed response with its request? is that your question? |
|
Back to top |
|
 |
niks29986 |
Posted: Sun Apr 05, 2015 2:18 am Post subject: MQ Message Expiry RO with Full Data |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Hi,
Thanks for your quick reply!
1. My backend application is over MQ.
2. On request I will cache the request with say 30 Sec Expiry for response correlation.
3. If I do not see any response in 30 Sec then I need expire the cache message with full data and compute the timeout response to APP.
4. To change the Report options and Expiry o cache I need to change the queue manager expiry interval property which might impact other Queue Manager performance.
I am looking for any better approach to compute the timeout response (not the delayed response) OR input on implications on changing the queue manager expiry interval. IBM docs say that interval can be 5 Sec but will have impact on performance.
All your responses/ inputs are much appreciated!
Kind Regards,
Nikhil |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Apr 05, 2015 8:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Why do you think you need to change the qmgr's expiry interval?
How does your processing application behave? Is it a long running process doing a get with wait on the input queue? More details, better advice!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
nelson |
Posted: Sun Apr 05, 2015 9:19 am Post subject: Re: MQ Message Expiry RO with Full Data |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
niks29986 wrote: |
Hi,
Thanks for your quick reply!
1. My backend application is over MQ.
2. On request I will cache the request with say 30 Sec Expiry for response correlation.
3. If I do not see any response in 30 Sec then I need expire the cache message with full data and compute the timeout response to APP.
4. To change the Report options and Expiry o cache I need to change the queue manager expiry interval property which might impact other Queue Manager performance.
I am looking for any better approach to compute the timeout response (not the delayed response) OR input on implications on changing the queue manager expiry interval. IBM docs say that interval can be 5 Sec but will have impact on performance.
All your responses/ inputs are much appreciated!
Kind Regards,
Nikhil |
If you what to control when a message expires you have to set the Expiry value in the MQMD in every message, not in the queue manager.
You are referring to this (that is more a tuning issue):
Quote: |
Periodic scan
You can specify an expiry interval in the queue manager object by using the EXPRYINT attribute. The queue manager maintains information about the expired messages on each queue, and knows at what time a scan for expired messages is worthwhile. Each time that the EXPRYINT interval is reached, the queue manager looks for candidate queues that are worth scanning for expired messages, and scans only those queues that it deems to be worthwhile. It does not scan all queues. This avoids any processor time being wasted on unnecessary scans. |
From your information, I don't see any problem.
You need to explain what do you mean by I am looking for any better approach to compute the timeout response, what are you doing now (how are you doing it?) and what are the issues that you have faced?
Maybe you could share with us what have you done in Message Broker; MQ by itself does not do anything, its just your transport. |
|
Back to top |
|
 |
niks29986 |
Posted: Sun Apr 05, 2015 1:40 pm Post subject: |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Hi All,
Thanks for your responses!
I agree that setting MQMD for each message should solve the problem but the concern is default expiry interval is set to 5 min on QM. If we set the MQRO with Full data less than 5 mins then I was not getting the desired results.
Query is do I need to change the default expiry (5 mins) of QM to achieve say 30 sec expiry (MQRO Full data) and does is impact the QM performance?
Once the message gets expired to diff queue with full data I can use that to compute the response.
Kind Regards,
Nikhil |
|
Back to top |
|
 |
nelson |
Posted: Sun Apr 05, 2015 7:08 pm Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
niks29986 wrote: |
Hi All,
Thanks for your responses!
I agree that setting MQMD for each message should solve the problem but the concern is default expiry interval is set to 5 min on QM. If we set the MQRO with Full data less than 5 mins then I was not getting the desired results.
Query is do I need to change the default expiry (5 mins) of QM to achieve say 30 sec expiry (MQRO Full data) and does is impact the QM performance?
Once the message gets expired to diff queue with full data I can use that to compute the response.
Kind Regards,
Nikhil |
Ok, see you point... Well, I guess this is like the garbage collection problem, a larger interval means that more messages has to be processed at once, a shorter interval means less messages and maybe more overhead of the scanning itself. Didn't find an official recommendation...
What about TimeoutControl and TimeoutNotification nodes? Seems to me more accurate to handle expiration times. |
|
Back to top |
|
 |
niks29986 |
Posted: Mon Apr 06, 2015 2:35 am Post subject: |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Hi,
Yes you got it right.
This is similar to garbage collection as I also understand.
If I go with timer nodes then for every request message I need to push a timer control and would be an overhead?
I had tested it and messages don't get expire with full data to replytoQueue if I don't change the QM.ini. I have not tested the performance impact on QM by changing this but it would be helpful to know if anyone know what would be the impact and has tested it before.
Kind Regards,
Nikhil |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 06, 2015 4:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tested the expiry while the queue has an active consumer on it? I would expect the expiry to come after the queue manager interval only if there is no active consumer on the queue. With active consumer, i mean one that is doing MQGET calls.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
nelson |
Posted: Mon Apr 06, 2015 7:29 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
niks29986 wrote: |
If I go with timer nodes then for every request message I need to push a timer control and would be an overhead? |
Maybe.. internally a message is put on a SYSTEM queue for each request, that will trigger your timeout flow. On the other hand you will get more accurate responses (timeouts) times.
If setting Expiry Interval in 5 seconds (the lowest value) for example doesn't mean a considerable impact on performance I guess your approach could work fine. I should ask IBM what's the impact... |
|
Back to top |
|
 |
niks29986 |
Posted: Mon Apr 06, 2015 12:52 pm Post subject: |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Sure.. I think I had tested with an active consumer but I will do a POC and share the results.
Also I thought timer control might increase the overhead?
Thanks! |
|
Back to top |
|
 |
niks29986 |
Posted: Tue Apr 07, 2015 11:05 am Post subject: |
|
|
Novice
Joined: 04 Sep 2014 Posts: 14
|
Hi,
I have done a POC and messages expire with full data after the default ExpiryInterval set on QM which is 5 minutes even if we set the expiry as less value.
I also observed that if I provide a BROWS request to the queue the message expires with full data as expected.
So my query now is, if only in case of Active GET call queue messages are moved or for BROWS call also the messages get moved in case of RO?
Kind Regards,
Nikhil |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 07, 2015 12:07 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
niks29986 wrote: |
So my query now is, if only in case of Active GET call queue messages are moved or for BROWS call also the messages get moved in case of RO? |
The message expiry will be noted by the queue manager for any MQGet call (destructive or non-destructive) .
Rather than changing the EXPIRYINT on the queue manager, or using a Timer node, I'd schedule a cron job on the queue(s) affected that runs an amqsbcg with the output going to null _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|