【发布时间】:2012-03-06 18:03:20
【问题描述】:
我们将 Microsoft.Samples.BizTalk.Adapter.Common 库用于我们的自定义 SMTP 接收适配器。除了一种情况,一切似乎都很好。如果邮件大于大约 5 MB 并且包含两个以上的附件,则该邮件会卡住。我们的适配器在 isoletadHost 上运行。在查询窗口中,我们看到消息保持活动状态。在我们的调查中,我们发现它卡在了 batch.Wait() 方法中。任何其他处理良好的消息。我们正在运行 Biztalk 2006 Standart。 谁能给我们任何建议?
SyncReceiveSubmitBatch batch = new SyncReceiveSubmitBatch(transportProxy, terminator, 1); Int32 计数 = 0; foreach(消息中的 IBaseMessage 消息) { 尝试 { batch.SubmitMessage(msg, null); 计数++; } 捕捉(例外前) { 尝试 { msg.SetErrorInfo(ex); 批处理.MoveToSuspendQ(msg); ThreadContext.Properties["EventID"] = 1007; logger.Error("提交错误", ex); } 捕获(异常 ex2) { ThreadContext.Properties["EventID"] = 1008; logger.Error("挂起错误", ex2); } } } 如果(计数!= 0) { 批处理.完成(); 如果(批处理。等待()) { ThreadContext.Properties["EventID"] = 1009; logger.Debug("消息发布"); } 别的 { ThreadContext.Properties["EventID"] = 1010; logger.Warn(String.Format("发布错误。成功发布 {1},{0} 条消息出错", batch.FailedMessages.Count, count - batch.FailedMessages.Count)); } } 别的 { ThreadContext.Properties["EventID"] = 1011; logger.Warn("没有找到消息"); }【问题讨论】:
标签: biztalk