[Info-vax] MQ series client support AST?
Hein RMS van den Heuvel
heinvandenheuvel at gmail.com
Thu Dec 10 21:54:44 EST 2009
On Dec 10, 2:08 pm, Jan-Erik Söderholm <jan-erik.soderh... at telia.com>
wrote:
> rockdale wrote:
> > Hi all:
>
> > I have a c application running on openvms and reading messages from MQ
> > Server on a windows machine. Right now, the application is polling the
> > message but now we want to change it to AST enabled:
:
> If I'm not wrong, you could also read from the MQ-queue
> with a timeout, that is, you are stuck in the read until
> something arrivs on the queue *or* the timeout "times-out".
> At timeout you can just re-issue the read operation.
Correct. That's how my customers typically uses MQ.
That gives you pretty much immediate control back when a message
arrives and give you a chance to look at other stuff every so often.
Now I was told it blocks AST while GETting, but never had a reason to
verify that. It made my customer opt for a short timeout and check
shutdown flags and the likes. Short (a few seconds) timeouts of course
incur more overhead.
Besides the basic GET you can also program INQuires to peek ahead in
the queue and fun stuff like that.
What you do NOT want to do is a classic poll where you try a GET and
go to sleep for a while if nothing found, to retry later.
Hein.
fwiw,
Hein.
More information about the Info-vax
mailing list