Enumerate MSMQ Journal entries with a Private Queue?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Enumerate MSMQ Journal entries with a Private Queue?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Enumerate MSMQ Journal entries with a Private Queue?  
Steve Yetter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-18-04 06:58 PM


I am trying to enumerate messages in a journal for a private queue but I
keep getting an exception that states there is an invalid parameter passed
to a function. Here is the code.

path contains a string like
" FormatName:DIRECT=OS:bizsql1\private$\to
_biztalk\journal$"

private int GetNumMsgsInQueue( string path )
{
int count = 0;
try
{

msgQueue = new MessageQueue( path );

// Get a cursor into the messages in the queue.
msgEnumerator = msgQueue.GetMessageEnumerator();

// Move to the next message and count it Doing this statement causes the
exception!!!!!!
while(  msgEnumerator.MoveNext() )
{
count++;
}
}
catch( Exception ex )
{
MessageBox.Show( ex.Message, this.Text, MessageBoxButtons.OK,
MessageBoxIcon.Warning );
}
return count;
}


Any help would be greatly appreciated.
--
The opinions stated above do not necessarily reflect those of St. Joseph's
Hospital,
The aforementioned institution takes no responsibility for the contents of
this message.







[ Post a follow-up to this message ]



    Re: Enumerate MSMQ Journal entries with a Private Queue?  
Steve Yetter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-18-04 06:58 PM

Solution is that the format name was incorrect. Should be:
 FormatName:DIRECT=OS:bizsql1\private$\to
_biztalk;journal
"Steve Yetter" <yetters@hotmail.com> wrote in message
news:e6kODXFCEHA.2560@TK2MSFTNGP12.phx.gbl...
>
> I am trying to enumerate messages in a journal for a private queue but I
> keep getting an exception that states there is an invalid parameter passed
> to a function. Here is the code.
>
> path contains a string like
> ""
>
>   private int GetNumMsgsInQueue( string path )
>   {
>    int count = 0;
>    try
>    {
>
>     msgQueue = new MessageQueue( path );
>
>     // Get a cursor into the messages in the queue.
>     msgEnumerator = msgQueue.GetMessageEnumerator();
>
>     // Move to the next message and count it Doing this statement causes
the
> exception!!!!!!
>     while(  msgEnumerator.MoveNext() )
>     {
>      count++;
>     }
>    }
>    catch( Exception ex )
>    {
>     MessageBox.Show( ex.Message, this.Text, MessageBoxButtons.OK,
> MessageBoxIcon.Warning );
>    }
>    return count;
>   }
>
>
> Any help would be greatly appreciated.
> --
> The opinions stated above do not necessarily reflect those of St. Joseph's
> Hospital,
> The aforementioned institution takes no responsibility for the contents of
> this message.
>
>







[ Post a follow-up to this message ]



    Re: Enumerate MSMQ Journal entries with a Private Queue?  
Steve Yetter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-18-04 06:58 PM

Solution is that the format name was incorrect. Should be:
 FormatName:DIRECT=OS:bizsql1\private$\to
_biztalk;journal
"Steve Yetter" <yetters@hotmail.com> wrote in message
news:e6kODXFCEHA.2560@TK2MSFTNGP12.phx.gbl...
>
> I am trying to enumerate messages in a journal for a private queue but I
> keep getting an exception that states there is an invalid parameter passed
> to a function. Here is the code.
>
> path contains a string like
> " FormatName:DIRECT=OS:bizsql1\private$\to
_biztalk\journal$"
>
>   private int GetNumMsgsInQueue( string path )
>   {
>    int count = 0;
>    try
>    {
>
>     msgQueue = new MessageQueue( path );
>
>     // Get a cursor into the messages in the queue.
>     msgEnumerator = msgQueue.GetMessageEnumerator();
>
>     // Move to the next message and count it Doing this statement causes
the
> exception!!!!!!
>     while(  msgEnumerator.MoveNext() )
>     {
>      count++;
>     }
>    }
>    catch( Exception ex )
>    {
>     MessageBox.Show( ex.Message, this.Text, MessageBoxButtons.OK,
> MessageBoxIcon.Warning );
>    }
>    return count;
>   }
>
>
> Any help would be greatly appreciated.
> --
> The opinions stated above do not necessarily reflect those of St. Joseph's
> Hospital,
> The aforementioned institution takes no responsibility for the contents of
> this message.
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:32 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register