Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/crystal-reports/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
消息stuck(Microsoft.Samples.BizTalk.Adapter.Common)_Biztalk - Fatal编程技术网

消息stuck(Microsoft.Samples.BizTalk.Adapter.Common)

消息stuck(Microsoft.Samples.BizTalk.Adapter.Common),biztalk,Biztalk,我们使用Microsoft.Samples.BizTalk.Adapter.Common库作为自定义SMTP接收适配器。除了一种情况外,一切似乎都很好。如果消息的大小超过大约5MB,并且包含两个以上的附件,则消息会阻塞。我们的适配器在isoletadHost上运行。在查询窗口中,我们看到消息保持活动状态。在我们的调查中,我们发现它出现在batch.Wait()方法中。任何其他消息处理良好。我们正在运行Biztalk 2006 Standart。 有谁能给我们提些建议吗 SyncReceiveSu

我们使用Microsoft.Samples.BizTalk.Adapter.Common库作为自定义SMTP接收适配器。除了一种情况外,一切似乎都很好。如果消息的大小超过大约5MB,并且包含两个以上的附件,则消息会阻塞。我们的适配器在isoletadHost上运行。在查询窗口中,我们看到消息保持活动状态。在我们的调查中,我们发现它出现在batch.Wait()方法中。任何其他消息处理良好。我们正在运行Biztalk 2006 Standart。 有谁能给我们提些建议吗

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"); } SyncReceiveSubmitBatch批处理=新的SyncReceiveSubmitBatch(transportProxy,终止符,1); Int32计数=0; foreach(消息中的IBaseMessage消息) { 尝试 { batch.SubmitMessage(消息,空); 计数++; } 捕获(例外情况除外) { 尝试 { msg.SetErrorInfo(ex); 批次。移动至暂停Q(味精); 属性[“EventID”]=1007; 记录器错误(“提交错误”,例如); } 捕获(异常ex2) { 属性[“EventID”]=1008; logger.Error(“挂起错误”,ex2); } } } 如果(计数!=0) { batch.Done(); if(batch.Wait()) { 属性[“EventID”]=1009; logger.Debug(“消息发布”); } 其他的 { 属性[“EventID”]=1010; logger.Warn(String.Format(“发布错误.成功发布{1},在{0}消息中出错”,batch.FailedMessages.Count,Count-batch.FailedMessages.Count)); } } 其他的 { 属性[“EventID”]=1011; logger.Warn(“未找到消息”); } 此修复:有助于解决问题。谢谢大家。

此修复程序帮助解决了问题。谢谢大家