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 » MQGMO_WAIT with 0 seconds of wait interval is not working

Post new topic  Reply to topic
 MQGMO_WAIT with 0 seconds of wait interval is not working « View previous topic :: View next topic » 
Author Message
magesh_chandren
PostPosted: Sun Oct 17, 2004 9:33 pm    Post subject: MQGMO_WAIT with 0 seconds of wait interval is not working Reply with quote

Novice

Joined: 16 Feb 2004
Posts: 12

Hi,

Using java MQ api is put and get messages on queues. It was working fine so far until I tried to manipulate with the wait interval.

I used to wait for messages with a particual correlation ID
(ie gmo.matchOptions = MQC.MQMO_MATCH_CORREL_ID;)
and with MQGMO_WAIT option on with a wait of 2 mins
(ie gmo.options = MQC.MQGMO_WAIT;
gmo.waitInterval = 120000;
)

Now Iam doing a manual performance check, like varying the wait intrval and see how long it takes to get the response. When I specified a waitInterval of 0 milliseconds, I wanted it to fail with no message on queue. However, it retrieved me the message from the queue ... Can anyone tell me how to resolve this ?

Thanks
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Oct 17, 2004 10:22 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

WaitInterval option is used only when the message is not found on the queue.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
zpat
PostPosted: Sun Oct 17, 2004 11:34 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Since the wait ends as soon as a message is available to meet the MQGET criteria - the value of the wait interval should not affect performance.
Back to top
View user's profile Send private message
magesh_chandren
PostPosted: Mon Oct 18, 2004 2:45 am    Post subject: Reply with quote

Novice

Joined: 16 Feb 2004
Posts: 12

I agree with what you say..... the performance what I was referring to was my backend prog performance. Sorry for not giving the whole picture.

In my application, I put a message A on to a queue say REQUESTQ. My Backend program receives this message and does some operation(it takes a time say x mins) and puts back a message B onto the queue.

So there is always a sufficient delay by the time I put the message and get the message. Hence, I expected a 2033 error when I give a wait of 0 secs.

Am I missing anything here ? Pls advice!
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Oct 18, 2004 2:08 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

How many messages did you have on the queue when you issued MQGET call for getting response message with 0 waitinterval. Can you try the same code without specifying MQGMO_WAIT option and see what happens?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Manikandan
PostPosted: Wed Oct 20, 2004 8:53 pm    Post subject: Reply with quote

Voyager

Joined: 07 Jul 2004
Posts: 78

wait interval option works like

wait until the message arrives on the queue.
If the message is already present in the queue is picks them immediately.

if you have an wait interval of 20000 i.e. 20 secs and then the message arrives at 10 secs it picks up and returns.
it does not mean it will wait all 20 secs,it will wait until the match message arrives.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 21, 2004 1:53 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Doesn't a 0 wait interval mean in fact wait forever ?
Seems if you don't want to wait you need to do a get with nowait option or a JMS receiveNoWait() (From memory)

Enjoy
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Oct 21, 2004 2:09 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
Doesn't a 0 wait interval mean in fact wait forever ?


No. The value of "-1" is the same as the constant for "Wait Unlimited".
_________________
I am *not* the model of the modern major general.
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 » MQGMO_WAIT with 0 seconds of wait interval is not working
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.