Skip to main content

Setting an MSMQ Timeout on a Receive

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

On the MSMQ Receive is it possible to specify a timeout ?

Resolution:

The timeout is actually the 4th parameter to the receive call. To specify just the tmeout you can mark the other parameters as "ommited",

The relevant code for this call is:-

      *> Receive message (using defaults)

               move low-values to v

               move VT-ERROR to VARIANTARG-varType of v

               invoke OleVariant "newWithData" using v

                                           returning ws-ommitted

               invoke QueueObject "Receive"

                    using ws-ommitted

                          ws-ommitted

                          ws-ommitted

                          by value 5000

                    returning MessageObject

Old KB# 1618

0 replies

Be the first to reply!