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 » How to configure the WaitInterval for MDBs

Post new topic  Reply to topic
 How to configure the WaitInterval for MDBs « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Fri Mar 19, 2004 1:03 pm    Post subject: How to configure the WaitInterval for MDBs Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

When an MDB is watching a queue, I suspect that it is simply issuing MQGETs with the WaitInterval set. Is this true? If so, is that WaitInterval configurable? If yes, what would be the drawback be to setting it to a high value, like an hour?

The reason I ask is that we are rolling out Transaction Vision, which is going to capture all MQ API calls. I am afraid that if I install it on a queue manager that hosts queues being watched by MDBs, I will be seeing tons of 2033s if the MDBs WaitInterval is small. Does an MDB actually do anything in between issuing MQGETs, or does it simply reissue the MQGET in a tight loop?

Is there any good doc on MDBs and how they play with WebSphere MQ? All the manuals I have looked at don't even acknowledge their existence.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
vennela
PostPosted: Fri Mar 19, 2004 1:41 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
I will be seeing tons of 2033s if the MDBs WaitInterval is small.

No
An MDB's onMessage method will be invoked only when a message arrives on a queue. It is kind of a trigger. When no message arrives no MQGet will be issued so no 2033.

Quote:
If so, is that WaitInterval configurable?

Yes
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bower5932
PostPosted: Fri Mar 19, 2004 1:48 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I think that Peter does have some concerns. The MDB (or the onMessage) won't actually ever see a 2033. However, under the covers, the MQGET will be getting them. I know that there are some parameters on the connection factories that control what MQ does. You'll probably have to play with them to get things the way that you want. I also know that you'll run into some 'funny' situations if you are using selectors. MQ will have to scan the queue looking for the messages that you may or may not want.

If your MDB is simple (ie, it plans on picking up all messages), I don't think you'll see much in the way of API calls that are captured from your normal MQGET. However, if you try to get fancy (ie, selectors), you may see more API calls captured.

You could always try taking a trace and giving it a quick look to see what is in it and how it might affect you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bower5932
PostPosted: Fri Mar 19, 2004 1:57 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Here is some information on the pollingint:

http://www-1.ibm.com/support/docview.wss?uid=swg21109568
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
StefanSievert
PostPosted: Fri Mar 19, 2004 5:46 pm    Post subject: Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

Hi Peter,
I recently was faced with the same question. For JMS applications, there is a POLLINGINT that is used as the wait interval, as others have mentioned. I could not find any place within the WAS configuration that has something similar for MDB's, neither in the listener configuration nor in the QCF settings.
My guess is that the MDB implementation sits on the queue with MQWI_UNLIMITED and reacts to some sort of an internal shutdown signal to end when WAS is shut down or when you stop the listener. Maybe one of the IBM folks can answer conclusively.
I haven't spent any time on trying to do a thread dump or anything, but if you have some spare time, you might want to try this out: http://www14.software.ibm.com/webapp/download/search.jsp?go=y&rs=thread
I am not sure that you can find out this way what's going on, but it might be fun to play with.

On a separate note: I would be surprised if your monitoring tool can't be configured to supress 2033's. Who really needs to monitor those in the first place? They are not really exceptions.
Just stirring the pot a little...
Stefan
_________________
Stefan Sievert
IBM Certified * WebSphere MQ
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Mar 19, 2004 5:51 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

All our MDBs are just generic consumers; they are happy getting any message that lands on the queue.

I unfortunatly do not have a JMS app or my own MDB to play with. And I hate going to the business area saying "Try This. Ok now try this. Ok, that didn't work, now try this."

Is there no doc that talks about MDBs and MQ?

The Using Java Manual states:
Quote:

The interval, in milliseconds, between scans of all receivers during asynchronous message delivery


The link bower pointed us to states:
Quote:

Yes, the POLLINGINT is JMS specific. JMS is relying in the underlying MQ functions. When the application sets up a QueueReceiver with a messageListener method this causes another thread to be started 'listening' for messages. In practice this thread issues
an MQGET with wait of POLLINGINT milliseconds. Without the wait of course this thread would be permanently blocked until a message arrived. This allows the close method a
window in which to close/release the QueueReciever object.


So, if I make the assumption that the MDB is a Queue Reciever (that's a correct assumtion, right?), then increasing the polling interval to 10 seconds should cut my 2033s as a result of the MDBs in half.

I would be all set to suggest this, were it not for jwende's thread, which states it cannot be more than 5000 ms anyway.
http://www.mqseries.net/phpBB2/viewtopic.php?t=14202
_________________
Peter Potkay
Keep Calm and MQ On


Last edited by PeterPotkay on Fri Mar 19, 2004 6:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Mar 19, 2004 5:58 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Stefan, I will check out that link at the office.

As far as just supresing 2033s, the problem is it would need to be done at the QM level. I don't want to supress 2033s for the apps that are requestors waiting for a reply message. If they get a 2033, that is a valid error.

What we are doing at this point is identifying queues that are being polled, and if they have very small WaitIntervals, and thus throw off huge amounts of 2033s, we are filtering out the queue completly from Transaction Vision monitoring for the time being. The problem is that now we have no data at all for the queue. I then contact the app and see why the low WaitInterval, and if they will up it. If they can, we'll turn TV back on for them. If not, we leave them out, because we cannot fill up our TV database with hundreds of thousands of 2033s.

Most apps will up it. I have found a couple of apps that code the Wait Option, but never coded an interval, so their app is spinning like mad, issuing MQGETs 10 times a second! Many others code a 1 or 5 sec interval.
And then we have our MDBs, which I hope we will be able to up past 5000ms.

I guess one of the main reasons for having a WaitInterval of X seconds is that when the MQGET unblocks after X seconds, trhe code can recognize that the parent app wants to end. If the MQGET, including those issued by MDBs, were waiting for 10 minutes, then the shutdown process of the app would be unacceptably long. And they all sigh heavely when I tell them about the concept of a QUIT message that would satisfy the MQGET and tell the app to end "I don't wanna recode my app ". And they really shouldn't just to satisfy a monitoring tool.

I wonder what I am going to find in production, when I turn this on for the Concentrator QM, that host a couple hundred queues. If that poor QM has been handling thousands of MQGET calls every minute, most returning 2033s, and not even straining, I will be impressed. We have had no performance complaints at all.

Anyway, I digress. If I can get the MDBs to use a WaitInterval of 10 or 15 seconds, that would keep everyone happy. I haven't opened a ticket with IBM, because the last time I got into specifics with JMS and MDBs, the tone turned to "Well, ya know, MDBs and Weblogics are not really an IBM thing. Have you considered WAS?"
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Apr 01, 2004 4:19 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

For what its worth, we set the QCF to 30 seconds, and the MDB still did the MQGET with a Wait Interval of 5000 milliseconds.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to configure the WaitInterval for MDBs
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.