Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. msmq throws an exception when called the receive.

msmq throws an exception when called the receive.

Scheduled Pinned Locked Moved C#
data-structuresdebuggingannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prasadbuddhika
    wrote on last edited by
    #1

    i'm using a msmq for my application and i create a queue when the application is loading.And to receive the message i set the timespan for 10, in the debug mode it works fine and the messages received as expected, but when i deploy the application in the release mode it gives a "timeout exception" at the receive method. i would really appreciate your ideas about this . thanks in advance.

    S 1 Reply Last reply
    0
    • P prasadbuddhika

      i'm using a msmq for my application and i create a queue when the application is loading.And to receive the message i set the timespan for 10, in the debug mode it works fine and the messages received as expected, but when i deploy the application in the release mode it gives a "timeout exception" at the receive method. i would really appreciate your ideas about this . thanks in advance.

      S Offline
      S Offline
      surender m
      wrote on last edited by
      #2

      If there are no messages in queue then it will raise tiemout exception. No need to worry about that exception .. just catch it and say there are no messages in 'Q'.

      No Defeat Is Final Until You Stop Trying!.......

      M 1 Reply Last reply
      0
      • S surender m

        If there are no messages in queue then it will raise tiemout exception. No need to worry about that exception .. just catch it and say there are no messages in 'Q'.

        No Defeat Is Final Until You Stop Trying!.......

        M Offline
        M Offline
        mahendren
        wrote on last edited by
        #3

        You should also possibly increase your timeout (or at least make it configurable) Or start another thread/method etc. to listen for the next message.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups