Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Microsoft Azure WebJobs SDK 3.0 Beta Boosts Application Development on the Cloud

Microsoft Azure WebJobs SDK 3.0 Beta Boosts Application Development on the Cloud

This item in japanese

Microsoft has released beta preview of Azure WebJobs SDK 3.0 with support for Azure Service Bus, which enables you to make use of queues and topics on functions. The SDK includes an improved function discovery mechanism and also added support for cancellation tokens and WebJobs shutdown notifications that can be used to automatically notifiy an administrator during the shutdown process. It also provides the ability to apply triggers on functions which are invoked through as shown below.

JobHost host = new JobHost();
new { inputText="input" }); 

The newly introduced JobHostConfiguration() function enables you to override the default connectionString names for your Azure Storage and Service Bus accounts. Microsoft has provided samples with source code, which you can use to further explore the features included with WebJobs SDK.

The main purpose of the Azure WebJobs SDK is to simplify the running of services or background tasks in a Web Site. It enables you to upload and run executable files as triggered or continuous WebJobs. It also provides a diagnostics and monitoring mechanism to enable you to easily monitor the performance of applications and will be helpful to process CPU intensive image and queue processing besides RSS aggregation, file maintenance and e-mail delivery.

The release brings in branding changes whereby the package, assembly and namespace names are modified to reflect the updated naming system. For instance, Microsoft.WindowsAzure.Jobs.Host has been updated as Microsoft.Azure.Jobs and Microsoft.WindowsAzure.Jobs has been renamed to Microsoft.Azure.Jobs.Core.

The latest update enables developers to monitor functions in the management dashboard with the ability to run and abort them. It also enables you to trigger a function and bind the message to your specified type or to a CLR type such as String, TextReader and TextWriter instead of specifying the attributes used on the function parameters.

Microsoft has also made few modifications by which a triggered QueueInput has been renamed as QueueTrigger and QueueOutput has become Queue. In the same way, a Triggered BlobInput has been renamed to BlobTrigger but a BlobInput or BlobOutput is Blob.

The SDK also enables you to access the dequeueCount of your queue message in addition to an ability to bind to Azure Storage Queue types

 public static void PropertyBinding(
     [QueueTrigger("inputqueue")] string inputText,
     int dequeueCount)

In the official blog post, Pranav Rastogi, Program Manager, ASP.NET has provided the detailed source code for all the new features.

The WebJobs SDK can be downloaded from the NuGet Gallery and can be installed from within the NuGet Package Manager Console

  Install-Package Microsoft.Azure.Jobs -Pre 


The following command should be used if you would like to make use of Microsoft Azure Service Bus triggers:

Install-Package Microsoft.Azure.Jobs.ServiceBus -Pre

Microsoft has also provided redirection packages to refelct the new package names

 Update-Package Microsoft.WindowsAzure.Jobs -Pre 
 Update-Package Microsoft.WindowsAzure.Jobs.Host -Pre

In order to deploy WebJobs, you can either make use of  the portal page or can use FTP, Git or Web Deploy using WebJobsVs Visual Studio extension. Rastogi has also provided a list of resources which helps you to learn WebJobs in detail besides a glimpse of the existing features introduced in the previous update.

Rate this Article