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");
}
This fix: http://support.microsoft.com/kb/928078 helped to solve the problem. Thanks all.