Message polling uses the mqeQueueManager_waitForMessage() method. This command issues a mqeQueueManager_getMessage() command to the remote queue at regular intervals. As soon as a message that matches the supplied filter becomes available, it is returned to the calling application.
qmgr.waitForMessage( "RemoteQMgr", "RemoteQueue", filter, null, 0, 60000 );
The mqeQueueManager_waitForMessage() method polls the remote queue for the length of time specified in its final parameter. The time is specified in milliseconds, so in the example above, the polling lasts for 60 seconds. The thread on which the command is executing is blocked for this length of time, unless a message is returned earlier.
Message polling works on both local and remote queues.