V
Vai2000
hi all, I have a winsvc which reads of messages out an MSMQ. Can someone
help with this problem.
If my server goes down and comes back up my WinSvc doesn't picks up messages
accumulated in the MSMQ , although my WinSvc is set to automatic restart
setting.
I have to manually go and restart the service then only it retrieves all the
messages from the MSMQ.
This is the code.....
/////////////////////////////////////////
protected override void OnStart(string[] args) // WinSvc
{
try
{
this._mqInbound.ReceiveCompleted += new
System.Messaging.ReceiveCompletedEventHandler(this.mqInbound_ReceiveComplete
d);
this._mqInbound.BeginReceive();
}
catch(Exception e)
{
// log exception
}
}
void mqInbound_ReceiveCompleted(object sender,ReceiveCompletedEventArgs
asyncResult)
{
// do something
messageQueue.BeginReceive();
}
/////////////////////////////////////////
TIA
help with this problem.
If my server goes down and comes back up my WinSvc doesn't picks up messages
accumulated in the MSMQ , although my WinSvc is set to automatic restart
setting.
I have to manually go and restart the service then only it retrieves all the
messages from the MSMQ.
This is the code.....
/////////////////////////////////////////
protected override void OnStart(string[] args) // WinSvc
{
try
{
this._mqInbound.ReceiveCompleted += new
System.Messaging.ReceiveCompletedEventHandler(this.mqInbound_ReceiveComplete
d);
this._mqInbound.BeginReceive();
}
catch(Exception e)
{
// log exception
}
}
void mqInbound_ReceiveCompleted(object sender,ReceiveCompletedEventArgs
asyncResult)
{
// do something
messageQueue.BeginReceive();
}
/////////////////////////////////////////
TIA