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 » General IBM MQ Support » how to poll a queue continuosly

Post new topic  Reply to topic
 how to poll a queue continuosly « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Thu Dec 18, 2003 12:44 pm    Post subject: how to poll a queue continuosly Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All


How to poll a queue continuously for incoming messages from several applications. Are we supposed to write some exra code for that or is thereany facility provided by mqseries for that.

Regards
brgmo
Back to top
View user's profile Send private message
skn
PostPosted: Thu Dec 18, 2003 1:10 pm    Post subject: Reply with quote

Centurion

Joined: 21 May 2003
Posts: 112
Location: Dallas

You can trigering mechanism to kick off your app when messages come in.
I dont think there is such a facility in MQ as such.Or you could let your app do the polling(ex JMS listeners can block on a queue for messages).
Back to top
View user's profile Send private message
JoePanjang
PostPosted: Thu Dec 18, 2003 6:37 pm    Post subject: Reply with quote

Voyager

Joined: 10 Jul 2002
Posts: 88
Location: Dengkil MALAYSIA

with trigger first on, do the MQGET with unlimited..
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Dec 18, 2003 6:46 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Why do that. Either use triggering or use an unlimited wait. Mixing the two doesn't make any sense.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
JoePanjang
PostPosted: Thu Dec 18, 2003 11:51 pm    Post subject: Reply with quote

Voyager

Joined: 10 Jul 2002
Posts: 88
Location: Dengkil MALAYSIA

if without trigger on, i will not get the trigger data(qname). In this case with the unlimited MQGET, how do i know the qname(without manually hardcode it)? Any chance to get it somewhere else?
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Dec 19, 2003 12:56 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Don't "poll" the queue - always MQGET with WAIT. This allows the queue manager to efficiently wait for you and immediately a message is available that satisifies your GET conditions it will be returned to you.

The wait interval is the maximum time before ending the GET without a message (2033). GET with WAIT does not cause any extra delay if messages are available, whereas polling will introduce an interval between retries.

Don't do an unlimited wait if you wait to be able to shut your application down. Get with wait for say 60 seconds, check for application shutdown, if not shutting down then reissue the Get with wait (and then repeat etc).

In terms of the queue name, most programs read this from their command line parameter or from an .ini file in a similar way to any other environmental variables.
Back to top
View user's profile Send private message
mrlinux
PostPosted: Fri Dec 19, 2003 9:18 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

If you do mqget with Wait unlimited, you could develop a special shutdown
message and then you could gracefully exit the application.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
EddieA
PostPosted: Fri Dec 19, 2003 9:43 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

And don't forget to use Fail If Quiescing. (Where avaialable )

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » General IBM MQ Support » how to poll a queue continuosly
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.