Geeks With Blogs

News The views expressed on this weblog are mine and do not necessarily reflect the views of my employer.

All postings are provided "AS IS" with no warranties, and confer no rights.

MotoWilliams dot this & dot that
So I have been using the generated WMI Classes from the Management (WMI) Extensions for Visual Studio .NET 2003 Server Explorer to build yet another version of a Suspended Queue Listener for when Biztalk Suspeneds a message in our FIFO solution. Anyway I ran into snag after the event fires. I get the suspended instance id without a problem but when I use the GetInstances with a SerivceInstanceID clause I only get one message, even when the suspended instance could have 2 or more messages suspended within it.

Here is the snippet:

 

  const int Zombies = 16;

  ServiceInstance.ServiceInstanceCollection serviceInstances = ServiceInstance.GetInstances( String.Format( "ServiceStatus='{0}'", Zombies ) );

 

  foreach ( ServiceInstance SuspendedInstance in serviceInstances )

  {

 

    MessageInstance.MessageInstanceCollection messageInstances = MessageInstance.GetInstances( String.Format( "ServiceInstanceID='{0}'", SuspendedInstance.InstanceID ) );

 

    foreach( MessageInstance SuspendedMsg in messageInstances )

    {

      Console.WriteLine( SuspendedMsg.MessageInstanceID );

    }

 

  }

 

Anybody have any ideas?

Posted on Sunday, February 12, 2006 10:34 AM Biztalk | Back to top


Comments on this post: Biztalk Server 2004: Using Generated WMI Classes to Query for Suspened Messages

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Eric Williams | Powered by: GeeksWithBlogs.net