Azure WebJobs SDK 1.1.0 RTM

We just published a new RTM release of the Azure WebJobs SDK packed with new features! This release opens a new extensibility model for the SDK which allows you to write custom triggers and binders for example, triggering functions based on file events, periodic schedules, etc. It leads to simplicity in developing and managing WebJobs, since you can now have a single WebJob with functions which can be triggered on Azure Queues, Blobs, Service Bus, Files, Timers, WebHooks – GitHub, Slack, Instagram, IFTTT and more. You can also set up alerts where you can send notification when a function fails. We’ve also added many new features and made many bug fixes based on your feedback.

Features in this release

This release is packed with many features around the new extensibility model for the SDK which allows you to write customer triggers and binders as well as core improvements to existing feature set. Following are some of the highlights in this release.

Extensible model for writing your own triggers and binders

The initial release of the SDK was focused on triggering functions based on events from Azure Queues, Blobs and Service Bus. Since the release of the SDK, we have received lots of feedback that developers would like to add more triggers such as triggering a function based on file events, schedule based triggers, events from SQL server and more. The new extensibility model allows extension authors to write new triggers and binders, and those extensions can be used by others in their applications.

We created a new open source repo which contains extensions demonstrating the new extensibility model. Follow this detailed guide on the architecture of the extensibility model. There is a sample you can use to get started with to write your own trigger or binder.

New triggers, binders and attributes

This release include many new ways for the SDK to trigger functions. Some new ways of triggering functions are as follows:

Schedule based using TimerTrigger

File based events using FileTrigger

Ensure only a single instance of a particular function will run at any given time across multiple hosts using Singleton attribute

Allow a function to timeout or after a specified amount of time using Timeout attribute

Send emails on function completion using the new SendGrid binding

Trigger functions based on some error threshold (Raise an alert if there are more than 10 errors in the last 1 hr) using ErrorTrigger.

The following snippet of code shows a WebJob which has functions which can be triggered on all these events. As you can see you can now have a single WebJob running with all these functions being triggered on different events. You can also leverage all the existing features of the SDK such as parameter binding, route matching and more.

New features in the Core SDK

Apart from opening up the extensibility model and adding more triggers and binders, we also added many features to the Core SDK. Many of these were feature requests from the community so we are thrilled to complete these asks in this release.

More control over Queue processing: A user can have more control (JobHostQueuesConfiguration.NewBatchThreshold) over the concurrency settings of how many queue messages are de-queued. A user can also plug in their own QueueProcessor to customize how Queue messages are processed.

Extensible tracing and logging: In this release we provided extensibility points so you can plug in your own logger.

Error monitoring system: This feature allows you to monitor the Host or functions for any errors. You can also raise alerts and send notifications via email or text or plugin any other system such as IFTTT.

Multiple storage account support: You can now use multiple storage accounts in your WebJob functions. This allows you to perform scenarios such as reading a blob from one storage account and archiving it to another storage account.

Control/customize the Azure Storage SDK clients used by the WebJobs SDK: Added JobHostConfiguration.StorageClientFactory to specify/set advanced options on CloudQueueClient/CloudBlobClient/CloudTableClient, etc.

ServiceBus enhancements

As part of opening up the extensibility model, we moved ServiceBus triggers and binders to be based off this new extensibility system. If you are using ServiceBus and you update to this version of the SDK, you will have to register ServiceBus triggers and binders as follows.

Service Bus connection string override is now provided by ServiceBusConfiguration. Please refer to the following sample.

Dashboard for monitoring

You can continue to use the dashboard to monitor all functions triggered based on various events. You get all the same benefits of the dashboard as before such as: real time monitoring, real time I/O, replay a function, abort a function etc. The following image shows the Functions view of the dashboard for this specific WebJob.

Download this release

You can download the WebJobs SDK from the NuGet gallery and can install these packages from the NuGet gallery using the NuGet Package Manager Console, like this:

Give feedback and get help

Summary

This release of the SDK opens up a whole new world of triggers and binders enabling extension authors to write triggers for any event type they choose. Examples include File events, Timer/Cron schedule events, SQL events, Redis pub/sub events, etc. (check out our links to further documentation and samples below). Triggers are no longer bound to Azure events only – you can write a trigger that monitors any event source you choose. It will make developing and managing apps based on triggers a lot easier. We are looking forward to seeing new triggers and binders being written by the community and receiving your feedback around the extensibility model.

Thank You!

Azure WebJobs team Find us on Twitter for the latest updates and use #AzureWebJobs.