How to a subscribe to a queue in msmq using c#. Assuming i have a client as a win form and would like to subscribe to a que, everytime a message is arrived in the que i would like the form to be notified about it. Any example. Thanks
You could also use WCF to subscribe to messages from an MSMQ queue and handle them as a service method in your WCF service.
Check out
You need to look at the types in namespace System.Messaging
.
There is full asynchronous support, so you can wait on a message arriving without halting your UI (but you'll need to use Control.BeginInvoke
to call back into your UI as normal for asynchronous actions in WinForms).
MSDN has plenty of examples, e.g. of an asynchronous message receive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With