MotoWilliams

dot this & dot that

  Home  |   Contact  |   Syndication    |   Login
  7 Posts | 0 Stories | 8 Comments | 4 Trackbacks

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.

Archives

Post Categories

A+ Blogs

Biztalk / Windows WF

PodCasts

WebSphere MQ

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