Search code examples
c#-4.0msmq

Can MSMQ raise an event if new message are available


As an alternative to constantly polling an existing Microsoft Messaging Queue, I would like to know if MSMQ by any chance can raise some type of event/notification to let applications know that a message is available?


Solution

  • MessageQueue has poor notification and hasn't message arrived notification (see MessageQueue Class)

    You could implement notifications yourself. Here is good implementation (see A simple MSMQ Listener helper class)