I would use asynchronous MessageQueue.BeginPeek to start listening on the queue:
queue.BeginPeek();
Then register a handler with the MessageQueue.PeekCompleted event:
queue.PeekCompleted += new PeekCompletedEventHandler(MessageHasBeenReceived);
Then in your handler use MessageQueue.EndPeek to access the message. Remember to call BeginPeek again.
private void MessageHasBeenReceived(object sender, PeekCompletedEventArgs e)
{
// Get message
var msg = queue.EndPeek(e.AsyncResult);
// Do message processing here
....
// Remove message from queue
queue.ReceiveById(msg.Id);
// Listen for more messages
queue.BeginPeek();
}
See here for MSDN example.