What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Jun 16, 2008 by dru.sellers
Locales: en, 0.1
UsingTheHostService  
The Host service allows the easy configuration of a Windows service for handling messages on the service bus.

Introduction

MassTransit includes an easy to use library MassTransit.Host.dll which should make running and deploying your service much easier. One decision that we made was that someone shouldn't have to know about InstallUtil to get the app up and running. What you will need to do is inherit HostedEnvironment in your own console project (which makes debugging from with in VS way easy, it runs as console by default), and then call the Runner.Run method.

Sample Command Lines

Action Command Line
run as console {YourProject}.exe
run as console {YourProject}.exe -console
run as service {YourProject}.exe -service
install service {YourProject}.exe -install
uninstall service {YourProject}.exe -uninstall

Project Structure

Having built a few services this way I am finding that in these projects I have two classes, the derived HostedEnvironment and the Program.Main plus some configuration files.

Confused?

If you have any question how to use this, please let us know, and also check our deployment solution which has our two service's install projects.


Sign in to add a comment