I have two components. One is the Window application, and the other is the Window service. The application window is written to the message queue (MSMQ) and the service reads it and processes the message.
If the service will always look for a queue for a new message ... As for the code, I should / use an infinite while
or Timer
while
OR
is there any event or callback in the queue for a new message added to the queue? So when a window application adds a new message to the queue, the service can know.
That's all I ask to make my application effective, so if there is any other way to achieve this, you can suggest.
thank you for reading
source share