• Post Reply Bookmark Topic Watch Topic
  • New Topic

MQ Polling Time

 
PJ Crump
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I inherited an app that uses MQ.jar to send and receive MQ messages to the mainframe. When I run transactions it seems as though there is some sort of polling time set so that records only come back to me every second (the code that pulls records off the respose queue is in a constant loop, w/ no waits).

Is there some sort of config parameter that controls how often records are available from the queue OR do I need to talk to our mainframe mq people?

Thanks - PJ
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you will probably have to get the mainframe people talking to you.

What is in MQ.jar? Is it IBM's MQ interface classes?

When a 'GET' is issued against a queue, there are two cases:

1) A NOWAIT option is specified. GET either returns immediately with a message or returns immediately with an 'NO_MESSAGE_ON_Q' type exception (or return code).

2) A WAIT option and a time is specified. If there is a message on the queue, control returns immediately with the message. If no message is currently on the queue, the GET will quietly wait for the specified amount of time. If a message is PUT on the queue during the wait time it is immediately returned. Otherwise the GET/WAIT ends with the 'NO_MESSAGE_ON_Q' exception.

So you get a flood of messages every second, is that correct?

There is one case I can think of where message(s) may be on a queue, but are un-GETable. This is if the PUT program is issuing the PUTs 'in transaction' (under syncpoint), and has not *yet* issued a COMMIT for the message(s) PUT.

If the sending process has a 1 second timer being used for COMMIT processing, that could explain what you are seeing. You should try and talk to the person responsiple for the PUT program I think.

Guy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!