Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このようなactivemqコンシューマー(.NET内)を使用することは可能ですか?
foreach(コンシューマーのvar msg){
//メッセージを処理します
}
メッセージが利用可能になるまで、CPUを消費せずに列挙ループが停止するように?何かがうまくいかない限り、事実上、それは無限ループになります。
同期消費を実行して、while ループで次のようなことを実現できます。
IMessage message = null; while((message = consumer.Receive()) != null) { //... process the message. }
-ティム www.fusesource.com