Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows service depending upon Message Queuing Service.

595 views
Skip to first unread message

Nitu

unread,
Aug 29, 2002, 7:17:37 AM8/29/02
to
Hi everybody,
Can any body tell me how i will make a windows service
which is depended on other windows service?
Actually,i have created a windows service which internally
uses MSMQ .My service is working perfectly fine when i
have logon to the system(I have made LocalSystem Windows
Service not user windows service)but when i reboot my
system then my service is giving me error that :
Message Queuing service is not available
But after login to the system i found that both my service
and MSMQ services r running.
So,kindly tell me that how i can control that my windows
service started only after message queue service gets
started.
Thanx in advance,
Nitu.

Kumar Gaurav Khanna

unread,
Aug 29, 2002, 7:49:40 AM8/29/02
to
Hi!

When you create an installer for your service, set its ServicesDependedOn
property to a string array, which contains the name of the services that
your service depends on.

When your service is then installed, the SCM shall ensure that these
services are running before it starts your service.

--
*************************************************************************
"French is the language of love, C# is for everything else..."
WinToolZone @ http://www.wintoolzone.com/
eXPerience.NET @ http://www.experiencedotnet.com/

"Nitu" <nitu...@fqsltd.com> wrote in message
news:384901c24f4d$ae8e9090$9be62ecf@tkmsftngxa03...

Nitu

unread,
Aug 30, 2002, 1:35:33 AM8/30/02
to
Hi Gaurav,
Thanx for ur reply.
I have set the Dependency of message queue service in my
windows service.But still my problem is not solved.Let me
elaborate my problem.
Actually i am not comfortable with system.messaging class
but i have to create a windows service not an exe that is
why i am using Microsoft Message Queue 2.0 Object Library
in my vb.net windows service.
I am trapping Event_Arrived Event of MSMQ to get the
arrival of new Msmq messages.That thing is perfectly
working when i have logged on to my system.But when i
reboot my system(Now I have set the dependency of message
queue service in my windows service)now its not giving me
error : message queue not available but its not trapping
that Event_Arrived Event and all my messages got lost.
I don't know where all my all msmq messages have gone,but
that is for sure its not reciving my messages in
Event_Arrived Event .
Kindly help me out i really need this.
Thanx once again.
Regards Nitu.

>.
>

Kumar Gaurav Khanna

unread,
Aug 30, 2002, 1:54:56 AM8/30/02
to
Hi!

Please check That your service is configured to auto start upon system
startup. Also, what string have you used to set the MSMQ service as your
service's dependencies?
--
*************************************************************************


"French is the language of love, C# is for everything else..."
WinToolZone @ http://www.wintoolzone.com/
eXPerience.NET @ http://www.experiencedotnet.com/

"Nitu" <nitu...@fqsltd.com> wrote in message

news:a2a601c24fe7$0f414290$35ef2ecf@TKMSFTNGXA11...

Nitu

unread,
Aug 30, 2002, 2:19:56 AM8/30/02
to
Hi Gaurav,
Yes i have set my service to automatic mode.I have set
Message Queuing string to set the MSMQ service as my
service's dependencies.And that is for sure that my
service is started before login to the system.
Actually,On the On_Start event of windows service i am
writing the Service starting time in a text file then i
set the Message Queue object in This On_start event only
and then i enable the RequestEvent_Arrived Event of MSMQ.
And in RequestEvent_Arrived event i am simply recieving
the message from the queue and then i print the message in
the same txt file.
The problem is my service started before login but the
events are not fired properly,all the messages r removed
from the queue i don't know , its all get recived in my
service or they r lost somewhere but it haven't write any
message in txt file it proves that RequestEvent_Arrived
event is not called at all and all my messages get lost.
Please tell me where i am going wrong.
Kindly help me.
Thanx and regards,
Nitu.

>-----Original Message-----
>Hi!
>
>Please check That your service is configured to auto
start upon system
>startup. Also, what string have you used to set the MSMQ
service as your
>service's dependencies?
>--

>.
>

Nauzad Kapadia

unread,
Aug 30, 2002, 10:12:19 AM8/30/02
to
hey hold on,

if i guess correctly your problem is not in the service or code or anything,
but in MSMQ itself.

when u shut down your PC, all messages that were there in private queues,
get DELETED.
i donlt know if this behaviour is by design.

so nitu, its not that the events r not getting fired. u r simply losing all
the messages when u shutdown your PC.

regards,
nauzad kapadia
www.quartzsystems.com

"Nitu" <nitu...@fqsltd.com> wrote in message

news:b04c01c24fed$42f8a4b0$b1e62ecf@tkmsftngxa04...

Kumar Gaurav Khanna

unread,
Aug 30, 2002, 3:15:47 PM8/30/02
to
Hi!

What mode of message queueing are you using? Are your messages havign their
Delivery proeprty set to EXPRESS or RECOVERABLE? Understand that express
messages are stored in memory and if MSMQ server restarts/crashes, then are
all lost. However, recoverable messages are stored in the memory too, but
also written to the disk. Incase the server crashes/restarts, then MSMQ
reads the messages from the written copies (and hence) recovers.

So, assuming everything else is fine, I suspect that the messages are having
their Delivery property set to EXPRESS, and hence get lost when the server
is restarted.

--


"French is the language of love, C# is for everything else..."

Kumar Gaurav Khanna
Early Achiever MCSE Windows 2000, MCSE NT 4.0, MCP+I
WWW: http://www.wintoolzone.com/
Email: gau...@wintoolzone.com

"Nitu" <nitu...@fqsltd.com> wrote in message

news:b04c01c24fed$42f8a4b0$b1e62ecf@tkmsftngxa04...

0 new messages