WCF を使用していない場合、有害なメッセージをどのように処理しますか? 以下のコードはループを作成します。MSMQ が有害なメッセージを自動的に処理するシステムを提供しているかどうかに興味がありました。
MessageQueue mq = new MessageQueue(@".\Private$\My/Queue");
while (true)
{
using (MessageQueueTransaction _transaction =
new MessageQueueTransaction())
{
_transaction.Begin();
try
{
Message msg = mq.Receive(_transaction);
//HandleMessage(msg);
throw new Exception("Kaboom!");
_transaction.Commit();
}
catch (Exception ex)
{
_transaction.Abort();
}
}
}