| Ruslan Yakushev [MSFT] 2004-10-28, 5:49 pm |
| You can find out what happened to the submitted batch by analysing the
TpBatchStatus structure. If you take a look at the EndSubmitMessages method
there is an "if" statement that checks if the tpStatus.status is greater
than zero. This is the simplest check which verifies if the overall batch
was successful or not. However the tpStatus has other property
tpStatus.operationStatus which is an array of results of submission for
every message in the batch.
So one of the ways to modify the EndSubmitMessages method is below:
In the last if statement:
if ( 0 <= tpStatus.status )
return true;
else
{
foreach(BTBatchOperationStatus opStatus in tpStatus.operationStatus)
{
if ((opStatus.OperationType == BatchOperationType.Submit) &&
(opStatus.MessageStatus == BTTransportProxy.E_BTS_NO_SUBSCRIPTION))
{
// Do something. For example suspend the corresponding message.
}
}
}
--------------------
>Thread-Topic: MBTSServiceInstanceSuspended Event not firing with Submit
Dire
>thread-index: AcS3nGXJ2G7TJk5EQOOyYJlp/H5CYw==
>X-WBNR-Posting-Host: 24.14.81.162
>From: "=?Utf-8?B?SGFyaXNoIC0gQXZhbmFkZQ==?="
<HarishAvanade@discussions.microsoft.com>
>References: <81FE584D-711D-4A62-8494-58744E7F9528@microsoft.com>
<ItIDs84tEHA.764@cpmsftngxa10.phx.gbl>
>Subject: RE: MBTSServiceInstanceSuspended Event not firing with Submit Dire
>Date: Thu, 21 Oct 2004 11:33:02 -0700
>Lines: 59
>Message-ID: <37D8D0F4-1D1E-4637-BAB0-740F4DB5F10D@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.biztalk.general
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:20917
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Vladimir:
>
>Thanks for your comments I am working with the SDK submit and I did notice
>the sample File Adapter has some code that suspendeds the messages. I am
not
>sure how I would know there was an exception that happened as my submit
does
>not fail should I use SubmitSync instead, yes I am using the
SubmitMessages
>(modified slightly to fit my needs) to submit a batch of message
(currently
>only one message in the batch). Do you know how I can capture the fact
that
>the routing failure occurred?
>
>"Vladimir Pogrebinsky" wrote:
>
Submit[vbcol=seagreen]
Direct.[vbcol=seagreen]
does[vbcol=seagreen]
shows[vbcol=seagreen]
fire[vbcol=seagreen]
I[vbcol=seagreen]
>
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
|