BizTalk Server Orchestration - How to find Messages queued up behind a Dehydrated instance.

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > August 2005 > How to find Messages queued up behind a Dehydrated instance.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to find Messages queued up behind a Dehydrated instance.
skumar

2005-08-03, 5:51 pm

We have a situation where a transaction would be dehydrated and will be
waiting for a correlated message to come through. In this case the Ordered
delivery is set to true and hence when we receive transactions to be
subscribed by this instance of the orchestration, they are all queued some
where within biztalk. All queud up transactions will flow through
successfully once the correlation transaction is completed. The problem is
that we Do not know where to look for these queued up transaction. Is there
any queries which could get us this data? and is there a way we could
retreive the Payload information of these waiting queud up transactions?


--
sujith
WenJun Zhang[msft]

2005-08-04, 7:54 am

Hi Sujith

We provide MSBTS_MessageInstance and MSBTS_ServiceInstance WMI
classes, which can help on such kind of automation scenarios with a
little programming.

We can enumerate messages in the message box using
MSBTS_MessageInstance WMI class, and look at two fields below figure
out state of the message:

[read, Description("This property contains state of the service
instance this message belongs to."), ValueMap{"1", "2", "4", "8",
"16", "32", "64"}, Values {"Ready
to run", "Active", "Suspended (resumable)", "Dehydrated", "Completed
with discarded messages", "Suspended (not resumable)", "In
breakpoint"} ]

uint32 ServiceInstanceStatus;

[read, Description("This property contains information about
how message is referenced by a service."), ValueMap{"1", "2", "4",
"8"}, Values {"Delivered, not
consumed", "Consumed", "Suspended", "Abandoned"} ]

uint32 ReferenceType;

Somebody had written a short sample code based on this to retrieve
dehydrated messages. I paste it there.

static void Main(string[] args)
{
int Dehydrated = 8;
ManagementObjectSearcher services =
new ManagementObjectSearcher(
"root\\MicrosoftBiztalkServer"-,
"select * from MSBTS_ServiceInstance where ServiceStatus=" +
Dehydrated);
foreach(ManagementObject o in services.Get())
{
ManagementObjectSearcher mos =
new ManagementObjectSearcher(
"root\\MicrosoftBiztalkServer"-,
"select * from MSBTS_MessageInstance where ServiceInstanceID='"+
o.GetPropertyValue("InstanceID-").ToString() +"'");
foreach(ManagementObject mo in mos.Get())
{
mo.InvokeMethod("SaveToFile",
new object[]{Environment.CurrentDi-rectory});

}
}
}

Note message tracking on the receive port must be turned on to make
the code work. Thanks.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no
rights.

skumar

2005-08-04, 7:54 am

Thanks for the reply,

Iam not looking to save the dehydrated messages. When an instance is
dehydrated and have ordered delivery set. Orchestration queues up the
messages to be delivered later. I was looking for a way to look up the convoy
queue.

Thanks

Sujith
--
sujith


""WenJun Zhang[msft]"" wrote:

> Hi Sujith
>
> We provide MSBTS_MessageInstance and MSBTS_ServiceInstance WMI
> classes, which can help on such kind of automation scenarios with a
> little programming.
>
> We can enumerate messages in the message box using
> MSBTS_MessageInstance WMI class, and look at two fields below figure
> out state of the message:
>
> [read, Description("This property contains state of the service
> instance this message belongs to."), ValueMap{"1", "2", "4", "8",
> "16", "32", "64"}, Values {"Ready
> to run", "Active", "Suspended (resumable)", "Dehydrated", "Completed
> with discarded messages", "Suspended (not resumable)", "In
> breakpoint"} ]
>
> uint32 ServiceInstanceStatus;
>
> [read, Description("This property contains information about
> how message is referenced by a service."), ValueMap{"1", "2", "4",
> "8"}, Values {"Delivered, not
> consumed", "Consumed", "Suspended", "Abandoned"} ]
>
> uint32 ReferenceType;
>
> Somebody had written a short sample code based on this to retrieve
> dehydrated messages. I paste it there.
>
> static void Main(string[] args)
> {
> int Dehydrated = 8;
> ManagementObjectSearcher services =
> new ManagementObjectSearcher(
> "root\\MicrosoftBiztalkServer"-,
> "select * from MSBTS_ServiceInstance where ServiceStatus=" +
> Dehydrated);
> foreach(ManagementObject o in services.Get())
> {
> ManagementObjectSearcher mos =
> new ManagementObjectSearcher(
> "root\\MicrosoftBiztalkServer"-,
> "select * from MSBTS_MessageInstance where ServiceInstanceID='"+
> o.GetPropertyValue("InstanceID-").ToString() +"'");
> foreach(ManagementObject mo in mos.Get())
> {
> mo.InvokeMethod("SaveToFile",
> new object[]{Environment.CurrentDi-rectory});
>
> }
> }
> }
>
> Note message tracking on the receive port must be turned on to make
> the code work. Thanks.
>
> Best regards,
>
> WenJun Zhang
> Microsoft Online Partner Support
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>

WenJun Zhang[msft]

2005-08-08, 8:27 am

Hi Sujith,

Maybe I haven't caught what you require. The MSBTS_ServiceInstance
returned from WMI query is just the queued message you are looking
for, isn't it?

Thanks.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com