消息卡住 (Microsoft.Samples.BizTalk.Adapter.Common )
我们使用 Microsoft.Samples.BizTalk.Adapter.Common 库作为自定义 SMTP 接收适配器。除了一种情况之外,一切似乎都很好。如果邮件大小超过大约 5 MB 并且包含两个以上附件,则会卡住。我们的适配器在 isoletadHost 上运行。在查询窗口中我们看到该消息保持活动状态。在我们的调查过程中,我们发现它卡在了batch.Wait()方法中。任何其他消息处理良好。我们正在运行 Biztalk 2006 Standard。 有人可以给我们提供任何建议吗?
SyncReceiveSubmitBatch batch = new SyncReceiveSubmitBatch(transportProxy, terminator, 1); Int32 count = 0; foreach (IBaseMessage msg in messages) { try { batch.SubmitMessage(msg, null); count++; } catch (Exception ex) { try { msg.SetErrorInfo(ex); batch.MoveToSuspendQ(msg); ThreadContext.Properties["EventID"] = 1007; logger.Error("Submit Error", ex); } catch (Exception ex2) { ThreadContext.Properties["EventID"] = 1008; logger.Error("Suspend Error", ex2); } } } if (count != 0) { batch.Done(); if (batch.Wait()) { ThreadContext.Properties["EventID"] = 1009; logger.Debug("Messages publised"); } else { ThreadContext.Properties["EventID"] = 1010; logger.Warn(String.Format("Publish error. Sucssefully publised {1}, error in {0} messages", batch.FailedMessages.Count, count - batch.FailedMessages.Count)); } } else { ThreadContext.Properties["EventID"] = 1011; logger.Warn("No message found"); }
We use Microsoft.Samples.BizTalk.Adapter.Common library for our custom SMTP Receive Adapter. Everything seems fine except one situation. The message stucks if it larger than approximatly 5 MB and it includes more than two attachments. Our adapter is run on isoletadHost. In query window we see that the message stay in active status. During our investigation we found that it stucks in a batch.Wait() method. Any other messages handling well. We are running Biztalk 2006 Standart.
Could anyone provide us with any suggestion?
SyncReceiveSubmitBatch batch = new SyncReceiveSubmitBatch(transportProxy, terminator, 1); Int32 count = 0; foreach (IBaseMessage msg in messages) { try { batch.SubmitMessage(msg, null); count++; } catch (Exception ex) { try { msg.SetErrorInfo(ex); batch.MoveToSuspendQ(msg); ThreadContext.Properties["EventID"] = 1007; logger.Error("Submit Error", ex); } catch (Exception ex2) { ThreadContext.Properties["EventID"] = 1008; logger.Error("Suspend Error", ex2); } } } if (count != 0) { batch.Done(); if (batch.Wait()) { ThreadContext.Properties["EventID"] = 1009; logger.Debug("Messages publised"); } else { ThreadContext.Properties["EventID"] = 1010; logger.Warn(String.Format("Publish error. Sucssefully publised {1}, error in {0} messages", batch.FailedMessages.Count, count - batch.FailedMessages.Count)); } } else { ThreadContext.Properties["EventID"] = 1011; logger.Warn("No message found"); }
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此修复:http://support.microsoft.com/kb/928078 帮助解决了问题。谢谢大家。
This fix: http://support.microsoft.com/kb/928078 helped to solve the problem. Thanks all.