Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Latest commit

 

History

History
40 lines (31 loc) · 1.52 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.52 KB

NServiceBus Webjobs

Repo to describe how to run NServiceBus backends as Azure WebJobs.

Complete Information

The complete use case is described on my blog at: Migrating NServiceBus backends to Azure WebJobs.

However, the changes can be summarized in:

  1. Transform your Class Library into a Console Application
  2. Introduce a Program.cs file (shown in this example)
  3. Make certain modifications to your EndpointConfig.cs (also shown in this example)

Source Code

There are two files in this repo that deserve attention:

  • Program.cs: shows how to intialize the enpoint asynchronously from a console application
  • EndpointConfig.cs: a dummy example on how to initialize a simple NSB endpoint.

Why name the class Program.cs? Because a WebJob can be essentially a simple console application. Keeping the standard name for .NET console applications just made sense.

Deployment

Deployment is also addressed on the post and can be summarized in:

  1. Using PowerShell
  2. Using Post-build events
  3. Using Nuget packages
  4. Poor's man deployment 😢

If you're using NuGet and bundling your deployment in a NuGet package by using Nuspec files, a simplified version using can be found at app.nuspec file.

Thanks

Thanks and don't forget to visit my blog at blog.hildenco.com

License

MIT