This article provides directions on using Lingon to restart MassTransit for OS X in the case of a failure.
MassTransit for OS X can be easily configured to restart automatically with launchd (a system service that replaces several older services such as xinetd, cron, etc) using a graphical interface called Lingon. Lingon works with Mac OS X 10.4.2 or later. It is similar to Microsoft's Windows Services, which can be configured to restart MassTransit automatically on Windows machines. You can read more about Lingon at http://www.macosxhints.com/article.php?story=20080421070721979.
You can download Lingon at: http://sourceforge.net/project/downloading.php?groupname=lingon&filename=Lingon-1.2.dmg&use_mirror=superb-east
Steps to configure Lingon to restart MassTransit after a failure:
- Open Lingon.
- Click the lock at the bottom to allow changes. If you are not already logged on as an administrator, you will be required to enter the administrator password at this time.
- Click Assistant.
- Select "Keep an application/script always running" and click Next.
- Enter a name for the job in the Label field.
- Deselect "Launch only when I log in."
- To enter the path to the MassTransit engine, click Path and navigate to /Applications/MassTransit Server 5 Folder/MassTransit Engine.app/Contents/MacOS/MassTransit engine and click Open.
(!) If you are using MassTransit Server 6, the Path will be: /Applications/MassTransit Server 6 Folder/MassTransit Engine.app/Contents/MacOS/MassTransit engine
- Click Create.
- Click the lock again to prevent further changes.
Note: Lingon does not need to be kept open in order for the services to be restarted if necessary.
If you need to shut down or restart your Mac, you will need to disable the auto-start User Agent for MassTransit via Lingon. This is accomplished by highlighting the User Agent and clicking on the Unload icon. Once you have restarted your Mac, you can re-enable the User Agent by highlighting it and clicking on the Load icon.