c# - Windows Service Options -


where used work, purely azure & @ other previous jobs did web applications. in azure, create worker act service bus queue listener...but in position, needing create windows service (to act msmq listener) , has been quite while since have done & have few minor questions.

  • question: normal windows service or there better wcf windows service option or equivalent?
  • question: need ensure multiple copies of same service can instantiated on same box...how do this? need set properties this?
  • question: if wanted ensure 1 copy instantiated, how that?

update:
need run many instances of same executable on same box. so, trying figure out how that.

any supporting articles welcomed. 'googled' quite bit, didn't find recent. seem outdated. hence, question.

thanks help.

service doesn't mean singleton

you can register many copies of windows service you'd -- careful assuming because it's service can run once!

if worried multiple users on same box "running" multiple copies of exe, running service solves problem.

if you're worried multiple copies of service "installed" need implement mutex.

think sqlserver exe "service." msft creates new service same exe each sql "service" on box.

how install 1 exe service more once.

services unique based on service name, not exe name or path. won't go detail on how create library install/start/stop services because else did.

but, can tell use same set of methods create multiple windows services same exe. service "name" btmonitor, , run several copies naming service "btmonitor$queue1", "btmonitor$queue2", "btmonitor$queue3" etc. note $ our own convention, not mysterious requirement.

then, append command line parameters exe configure each "$queue."

for rest of question, i'll defer scott's excellent answer.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -