tags:

views:

74

answers:

0

Is it possible to use an activemq consumer (in .NET) like this?

foreach (var msg in consumer) {

// process message

}

such that the enumeration loop stops, without consuming CPU, until a message is available? Effectively it would be an infinite loop unless something goes wrong.