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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. MSMQ

MSMQ

Scheduled Pinned Locked Moved C#
data-structuresquestion
4 Posts 2 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.
  • V Offline
    V Offline
    vibhas1982
    wrote on last edited by
    #1

    how can i automatically retreive message from a queue without any postback on the receivers side.

    hello every one

    S 1 Reply Last reply
    0
    • V vibhas1982

      how can i automatically retreive message from a queue without any postback on the receivers side.

      hello every one

      S Offline
      S Offline
      snorkie
      wrote on last edited by
      #2

      In my experience, the only way that the post back happens is if the Message has a return queue and you use it. Is your question how to read a queue, or if the reply happens automatically? Hogan

      V 1 Reply Last reply
      0
      • S snorkie

        In my experience, the only way that the post back happens is if the Message has a return queue and you use it. Is your question how to read a queue, or if the reply happens automatically? Hogan

        V Offline
        V Offline
        vibhas1982
        wrote on last edited by
        #3

        yes u got it right. i want to automatically retreive message when it arrives in queue but the client should not refresh it .

        hello every one

        S 1 Reply Last reply
        0
        • V vibhas1982

          yes u got it right. i want to automatically retreive message when it arrives in queue but the client should not refresh it .

          hello every one

          S Offline
          S Offline
          snorkie
          wrote on last edited by
          #4

          Try using the Events from the MessageQueue object. MessageQueue mq = new MessageQueue(); mq.ReceiveCompleted += new System.Messaging.ReceiveCompletedEventHandler(MessageQueue_ReceiveCompleted); //Call this to start processing mq.BeginReceive(); Then have the event handler that processes the delegate. private void MessageQueue_ReceiveCompleted (object source, System.Messaging.ReceiveCompletedEventArgs asyncResult) { MessageQueue mq = null; try { mq = (MessageQueue)source; //Create a Message object and populate it from the event. System.Messaging.Message mes = mq.EndReceive(asyncResult.AsyncResult); //Do your message queue work here. }

          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