{"id":214,"date":"2014-09-12T19:26:47","date_gmt":"2014-09-12T19:26:47","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2014\/09\/12\/announcing-the-0-6-0-beta-preview-of-microsoft-azure-webjobs-sdk\/"},"modified":"2022-08-08T04:01:04","modified_gmt":"2022-08-08T11:01:04","slug":"announcing-the-0-6-0-beta-preview-of-microsoft-azure-webjobs-sdk","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-the-0-6-0-beta-preview-of-microsoft-azure-webjobs-sdk\/","title":{"rendered":"Announcing the 0.6.0-beta preview of Microsoft Azure WebJobs SDK"},"content":{"rendered":"<p>We are releasing another preview of the Microsoft Azure WebJobs SDK, which was <a href=\"http:\/\/www.hanselman.com\/blog\/IntroducingWindowsAzureWebJobs.aspx\">introduced by Scott Hanselman<\/a>. To read more about the previous preview, read this <a href=\"http:\/\/azure.microsoft.com\/blog\/2014\/09\/06\/announcing-the-0-5-0-beta-preview-of-microsoft-azure-webjobs-sdk\/\">announcement post<\/a>.<\/p>\n<p>This release has the same general feature set as 0.5.0-beta as well as a few new exciting ones.<\/p>\n<h2><strong>Download this release<\/strong><\/h2>\n<p>You can download the WebJobs SDK from the NuGet gallery. You can install or update these packages from the NuGet gallery using the NuGet Package Manager Console, like this:<\/p>\n<pre>Install-Package Microsoft.Azure.WebJobs \u2013Pre<\/pre>\n<p>If you want to use Microsoft Azure Service Bus triggers, install the following package: \n  <\/p>\n<pre>Install-Package Microsoft.Azure.WebJobs.ServiceBus -Pre<\/pre>\n<h4><\/h4>\n<h2><strong>What is the WebJobs SDK?<\/strong><\/h2>\n<p>The <a href=\"http:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/web-sites-create-web-jobs\/\">WebJobs<\/a> feature of Microsoft Azure Web Sites provides an easy way for you to run programs such as services or background tasks in a Web Site. You can upload and run an executable file such as an <i>.exe<\/i>, <i>.cmd<\/i>, or <i>.bat<\/i> file to your web site while running these as triggered or continuous WebJobs. Without the WebJobs SDK, connecting and running background task requires a lot of complex programming. The SDK provides a framework that lets you write a minimum amount of code to get common tasks done.<\/p>\n<p>The <strong>WebJobs SDK<\/strong> has a binding and trigger system which works with Microsoft Azure Storage Blobs, Queues and Tables as well as Service Bus. The binding system makes it easy to write code that reads or writes Microsoft Azure Storage objects. The trigger system calls a function in your code whenever any new data is received in a queue or blob.<\/p>\n<h2><strong>Updates in this preview<\/strong><\/h2>\n<h3><strong>Table Ingress.<\/strong><\/h3>\n<p>One of the offerings in the SDK is to bind to Azure Storage Tables. In this release the SDK allows you to Ingress data into Azure Tables. Ingress is a common scenario when you are parsing files stored in blobs and storing the values in Tables such as CSV readers. In these cases the Ingress function could be writing lots of rows (<em>million in some cases<\/em>).<\/p>\n<p>The WebJobs SDK makes it possible to implement this functionality easily and allows add real time monitoring capabilities such as number of rows written in the table so you can monitor the progress of the Ingress function.<\/p>\n<p>The following function show how you can write 100,000 rows into Azure Table storage.<\/p>\n<p><strong><\/strong><\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c91401f1-709a-44de-a508-9070f9708eed\" class=\"wlWriterEditableSmartContent\" style=\"float: none;padding-bottom: 0px;padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol start=\"1\" style=\"background: #ffffff;margin: 0 0 0 2.5em;padding: 0 0 0 5px\">\n<li><span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">class<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">Program<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">void<\/span><span style=\"background:#ffffff;color:#000000\"> Main()<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#2b91af\">JobHost<\/span><span style=\"background:#ffffff;color:#000000\"> host = <\/span><span style=\"background:#ffffff;color:#0000ff\">new<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">JobHost<\/span><span style=\"background:#ffffff;color:#000000\">();<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">host.Call(<\/span><span style=\"background:#ffffff;color:#0000ff\">typeof<\/span><span style=\"background:#ffffff;color:#000000\">(<\/span><span style=\"background:#ffffff;color:#2b91af\">Program<\/span><span style=\"background:#ffffff;color:#000000\">).GetMethod(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;Ingress&quot;<\/span><span style=\"background:#ffffff;color:#000000\">));<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">[<\/span><span style=\"background:#ffffff;color:#2b91af\">NoAutomaticTrigger<\/span><span style=\"background:#ffffff;color:#000000\">]<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">void<\/span><span style=\"background:#ffffff;color:#000000\"> Ingress([<\/span><span style=\"background:#ffffff;color:#2b91af\">Table<\/span><span style=\"background:#ffffff;color:#000000\">(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;Ingress&quot;<\/span><span style=\"background:#ffffff;color:#000000\">)] <\/span><span style=\"background:#ffffff;color:#2b91af\">ICollector<\/span><span style=\"background:#ffffff;color:#000000\">&lt;<\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><span style=\"background:#ffffff;color:#000000\">&gt; tableBinding)<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#008000\">\/\/ Loop to simulate Ingressing lots of rows. <\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#008000\">\/\/ You would replace this with your own logic<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#008000\">\/\/ of reading from blob storage and write to Azure Tables.<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">for<\/span><span style=\"background:#ffffff;color:#000000\"> (<\/span><span style=\"background:#ffffff;color:#0000ff\">int<\/span><span style=\"background:#ffffff;color:#000000\"> i = 0; i &lt; 100000; i++)<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">tableBinding.Add(<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">new<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><span style=\"background:#ffffff;color:#000000\">() <\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">{ PartitionKey = <\/span><span style=\"background:#ffffff;color:#a31515\">&quot;Foo&quot;<\/span><span style=\"background:#ffffff;color:#000000\">, RowKey = i.ToString(), Name = <\/span><span style=\"background:#ffffff;color:#a31515\">&quot;Name&quot;<\/span><span style=\"background:#ffffff;color:#000000\"> }<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">);<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">class<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> PartitionKey { <\/span><span style=\"background:#ffffff;color:#0000ff\">get<\/span><span style=\"background:#ffffff;color:#000000\">; <\/span><span style=\"background:#ffffff;color:#0000ff\">set<\/span><span style=\"background:#ffffff;color:#000000\">; }<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> RowKey { <\/span><span style=\"background:#ffffff;color:#0000ff\">get<\/span><span style=\"background:#ffffff;color:#000000\">; <\/span><span style=\"background:#ffffff;color:#0000ff\">set<\/span><span style=\"background:#ffffff;color:#000000\">; }<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> Name { <\/span><span style=\"background:#ffffff;color:#0000ff\">get<\/span><span style=\"background:#ffffff;color:#000000\">; <\/span><span style=\"background:#ffffff;color:#0000ff\">set<\/span><span style=\"background:#ffffff;color:#000000\">; }<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>When you run this function and view the function in the dashboard, you will the following snapshot. The dashboard will show in real time how many rows are written in the table called \u201cIngress\u201d. Since this is a long running function the dashboard shows an \u201cAbort Host\u201d button which allows you to cancel a long running function.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/09\/3162.IngressInProcess_thumb_0DD1D0C0.png\"><img decoding=\"async\" title=\"IngressInProcess\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"IngressInProcess\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/09\/3162.IngressInProcess_thumb_0DD1D0C0.png\" width=\"701\" height=\"355\" \/><\/a> <\/p>\n<p>When the Ingress function completes successfully, then the dashboard displays a success message as shown below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/09\/5810.IngressComplete_thumb_349FE700.png\"><img decoding=\"async\" title=\"IngressComplete\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"IngressComplete\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/09\/5810.IngressComplete_thumb_349FE700.png\" width=\"707\" height=\"443\" \/><\/a> <\/p>\n<p>In the above example, the Ingress function was invoked through host.Call(). You can use this pattern to call this Ingress program on a schedule. You can also call the Ingress function when a new blob is uploaded in a container. For eg. if you have a background processing program which parses files stored in blob storage and writes the data into tables then you can do something like below:<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a5c83e60-e65d-4795-8394-17173542b74d\" class=\"wlWriterEditableSmartContent\" style=\"float: none;padding-bottom: 0px;padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol start=\"1\" style=\"background: #ffffff;margin: 0 0 0 2.5em;padding: 0 0 0 5px\">\n<li><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">class<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">Program<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">void<\/span><span style=\"background:#ffffff;color:#000000\"> Main()<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#2b91af\">JobHost<\/span><span style=\"background:#ffffff;color:#000000\"> host = <\/span><span style=\"background:#ffffff;color:#0000ff\">new<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">JobHost<\/span><span style=\"background:#ffffff;color:#000000\">();<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">host.RunAndBlock();<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">void<\/span><span style=\"background:#ffffff;color:#000000\"> CSVParsing(<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">[<\/span><span style=\"background:#ffffff;color:#2b91af\">BlobTrigger<\/span><span style=\"background:#ffffff;color:#000000\">(<\/span><span style=\"background:#ffffff;color:#a31515\">@&quot;table-uploads&#092;{name}&quot;<\/span><span style=\"background:#ffffff;color:#000000\">)] <\/span><span style=\"background:#ffffff;color:#2b91af\">TextReader<\/span><span style=\"background:#ffffff;color:#000000\"> input,<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">[<\/span><span style=\"background:#ffffff;color:#2b91af\">Table<\/span><span style=\"background:#ffffff;color:#000000\">(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;Ingress&quot;<\/span><span style=\"background:#ffffff;color:#000000\">)] <\/span><span style=\"background:#ffffff;color:#2b91af\">ICollector<\/span><span style=\"background:#ffffff;color:#000000\">&lt;<\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><span style=\"background:#ffffff;color:#000000\">&gt; tableBinding)<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#008000\">\/\/ This is psuedo code showing how you can parse your CSV files<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#008000\">\/\/ and store them into Azure Tables<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#2b91af\">IEnumerable<\/span><span style=\"background:#ffffff;color:#000000\">&lt;<\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><span style=\"background:#ffffff;color:#000000\">&gt; rows = ParseUsingMyCSVParser&lt;<\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><span style=\"background:#ffffff;color:#000000\">&gt;(inputStream);<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">foreach<\/span><span style=\"background:#ffffff;color:#000000\"> (<\/span><span style=\"background:#ffffff;color:#0000ff\">var<\/span><span style=\"background:#ffffff;color:#000000\"> row <\/span><span style=\"background:#ffffff;color:#0000ff\">in<\/span><span style=\"background:#ffffff;color:#000000\"> rows)<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">tableBinding.Add(row);<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">class<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">Person<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> PartitionKey { <\/span><span style=\"background:#ffffff;color:#0000ff\">get<\/span><span style=\"background:#ffffff;color:#000000\">; <\/span><span style=\"background:#ffffff;color:#0000ff\">set<\/span><span style=\"background:#ffffff;color:#000000\">; }<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> RowKey { <\/span><span style=\"background:#ffffff;color:#0000ff\">get<\/span><span style=\"background:#ffffff;color:#000000\">; <\/span><span style=\"background:#ffffff;color:#0000ff\">set<\/span><span style=\"background:#ffffff;color:#000000\">; }<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> Name { <\/span><span style=\"background:#ffffff;color:#0000ff\">get<\/span><span style=\"background:#ffffff;color:#000000\">; <\/span><span style=\"background:#ffffff;color:#0000ff\">set<\/span><span style=\"background:#ffffff;color:#000000\">; }<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>As a developer now you implement Ingress scenarios fairly easily and also get real time monitoring on the dashboard without having to write any diagnostics code yourself.<\/p>\n<p>Apart from Ingress scenarios, you can also do the following with Azure Tables:<\/p>\n<ul>\n<li>Read a single entity. <\/li>\n<li>Enumerate a partition. <\/li>\n<li>Bind to IQueryable\/ IEnumerable to get a list of entities. <\/li>\n<li>Create, Update and Delete entities. <\/li>\n<\/ul>\n<p>Please see the following sample for more information: <a title=\"https:\/\/github.com\/Azure\/azure-webjobs-sdk-samples\/tree\/master\/BasicSamples\/TableOperations\" href=\"https:\/\/github.com\/Azure\/azure-webjobs-sdk-samples\/tree\/master\/BasicSamples\/TableOperations\">https:\/\/github.com\/Azure\/azure-webjobs-sdk-samples\/tree\/master\/BasicSamples\/TableOperations<\/a><\/p>\n<h3><strong>Sending multiple messages on a queue.<\/strong><\/h3>\n<p>Starting with this version, you can use <em>ICollector.Add() <\/em>to send multiple messages to a queue.<\/p>\n<p><strong>Note: <\/strong>In the previous version of the SDK you were using ICollection, which is removed. Please use <em><strong>ICollector <\/strong><\/em>going forward.<\/p>\n<p>Another behavior change is now as soon as you do Add(), the SDK will write the message on a queue. In the previous version the SDK would wait until the function completed before it wrote all the messages to a queue.<\/p>\n<p>The following code shows how you can send multiple messages to a queue.<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c45bebf8-af56-4f3c-8a3a-8ba199cfa7ca\" class=\"wlWriterEditableSmartContent\" style=\"float: none;padding-bottom: 0px;padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol start=\"1\" style=\"background: #ffffff;margin: 0 0 0 2.5em;padding: 0 0 0 5px\">\n<li><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">class<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">Program<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">void<\/span><span style=\"background:#ffffff;color:#000000\"> Main()<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#2b91af\">JobHost<\/span><span style=\"background:#ffffff;color:#000000\"> host = <\/span><span style=\"background:#ffffff;color:#0000ff\">new<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#2b91af\">JobHost<\/span><span style=\"background:#ffffff;color:#000000\">();<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">host.RunAndBlock();<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#0000ff\">public<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">static<\/span><span style=\"background:#ffffff;color:#000000\"> <\/span><span style=\"background:#ffffff;color:#0000ff\">void<\/span><span style=\"background:#ffffff;color:#000000\"> WriteMultipleQueueMessages(<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">[<\/span><span style=\"background:#ffffff;color:#2b91af\">QueueTrigger<\/span><span style=\"background:#ffffff;color:#000000\">(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;queue&quot;<\/span><span style=\"background:#ffffff;color:#000000\">)] <\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\"> message,<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">[<\/span><span style=\"background:#ffffff;color:#2b91af\">Queue<\/span><span style=\"background:#ffffff;color:#000000\">(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;outputqueue&quot;<\/span><span style=\"background:#ffffff;color:#000000\">)]<\/span><span style=\"background:#ffffff;color:#2b91af\">ICollector<\/span><span style=\"background:#ffffff;color:#000000\">&lt;<\/span><span style=\"background:#ffffff;color:#0000ff\">string<\/span><span style=\"background:#ffffff;color:#000000\">&gt; output)<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">{<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\"><\/span><span style=\"background:#ffffff;color:#008000\">\/\/ Process queue message and write multiple messages to the outputqueue<\/span><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">output.Add(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;message1&quot;<\/span><span style=\"background:#ffffff;color:#000000\">);<\/span><\/li>\n<li style=\"background: #f3f3f3\">\u00a0\u00a0\u00a0\u00a0<span style=\"background:#ffffff;color:#000000\">output.Add(<\/span><span style=\"background:#ffffff;color:#a31515\">&quot;message2&quot;<\/span><span style=\"background:#ffffff;color:#000000\">);<\/span><\/li>\n<li><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"background:#ffffff;color:#000000\">}<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<h3>&#160;<\/h3>\n<h2><strong>Samples<\/strong><\/h2>\n<p>Samples for WebJobs SDK can be found at <a href=\"https:\/\/github.com\/Azure\/azure-webjobs-sdk-samples\">https:\/\/github.com\/Azure\/azure-webjobs-sdk-samples<\/a><\/p>\n<ul>\n<ul>\n<li>You can find samples on how to use triggers and bindings for blobs, tables, queues and Service Bus. <\/li>\n<li>There is a sample called PhluffyShuffy which is an Image processing Website where a customer can upload pictures which will trigger a function to process those pictures from blob storage. <\/li>\n<\/ul>\n<\/ul>\n<h2><strong>Documentation<\/strong><\/h2>\n<ul>\n<ul>\n<li><a href=\"http:\/\/www.asp.net\/aspnet\/overview\/developing-apps-with-windows-azure\/getting-started-with-windows-azure-webjobs\">Tutorial: Getting Started with the Windows Azure WebJobs SDK<\/a> <\/li>\n<li><a href=\"https:\/\/channel9.msdn.com\/Shows\/Web+Camps+TV\/Making-Your-Jobs-Easier-With-Windows-Azure-WebJobs-SDK\">Channel 9 video on Making Your Jobs Easier With Windows Azure WebJobs SDK<\/a> <\/li>\n<li><a href=\"http:\/\/www.hanselman.com\/blog\/IntroducingWindowsAzureWebJobs.aspx\">Introduction to WebJobs and SDK by Scott Hanselman<\/a> <\/li>\n<li><a href=\"http:\/\/www.bradygaster.com\/post\/rebuilding-the-sitemonitr-using-windows-azure-webjobs\">A web site monitor built using WebJobs and ASP.NET<\/a> by <a href=\"https:\/\/twitter.com\/bradygaster\">Brady Gaster<\/a> <\/li>\n<li><a href=\"http:\/\/www.asp.net\/aspnet\/overview\/developing-apps-with-windows-azure\/azure-webjobs-recommended-resources\">Azure WebJobs \u2013 Recommended Resources<\/a> <\/li>\n<li><a href=\"https:\/\/channel9.msdn.com\/Tags\/azurefridaywebjobs\">WebJobs video series on Azure Friday<\/a> <\/li>\n<\/ul>\n<\/ul>\n<h2><\/h2>\n<h2><strong>Deploying WebJobs with SDK to Azure Websites<\/strong><\/h2>\n<p>Visual Studio 2013 Update 3 with Azure SDK 2.4 added Visual Studio Tooling support to publish WebJobs to Azure Websites. For more information, see <a name=\"how-to-deploy-azure-webjobs-to-azure-websites\"><\/a><a href=\"http:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/websites-dotnet-deploy-webjobs\/\">How to Deploy Azure WebJobs to Azure Websites<\/a><\/p>\n<h2><\/h2>\n<h2><strong>Known Issues when migrating from 0.5.0-beta to 0.6.0-beta<\/strong><\/h2>\n<h3><strong>ICollector instead of ICollection<\/strong><\/h3>\n<p>In the previous version of the SDK you were using ICollection, which is removed. Please use <em><strong>ICollector <\/strong><\/em>going forward starting this release.<\/p>\n<p>Another behavior change is now as soon as you do Add() in this case, the SDK will write the message on a queue. In the previous version the SDK would wait until the function completed before it wrote all the messages to a queue.<\/p>\n<h2><strong>Give feedback and get help<\/strong><\/h2>\n<p>The <a href=\"http:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/web-sites-create-web-jobs\/\">WebJobs<\/a> feature of Microsoft Azure Web Sites and the Microsoft Azure WebJobs SDK are in preview. Any feedback to improve this experience is always welcome.<\/p>\n<p>If you have questions that are not directly related to the tutorial, you can post them to the <a href=\"http:\/\/azure.microsoft.com\/en-us\/support\/forums\/\">Azure forum<\/a>, the <a href=\"http:\/\/forums.asp.net\/1247.aspx\">ASP.NET forum<\/a>, or <a href=\"http:\/\/stackoverflow.com\/\">StackOverflow.com<\/a>. Use <a href=\"https:\/\/twitter.com\/search?q=AzureWebJobs\">#AzureWebJobs<\/a> SDK for Twitter and the tag Azure-WebJobsSDK for StackOverflow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are releasing another preview of the Microsoft Azure WebJobs SDK, which was introduced by Scott Hanselman. To read more about the previous preview, read this announcement post. This release has the same general feature set as 0.5.0-beta as well as a few new exciting ones. Download this release You can download the WebJobs SDK [&hellip;]<\/p>\n","protected":false},"author":408,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[],"class_list":["post-214","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet"],"acf":[],"blog_post_summary":"<p>We are releasing another preview of the Microsoft Azure WebJobs SDK, which was introduced by Scott Hanselman. To read more about the previous preview, read this announcement post. This release has the same general feature set as 0.5.0-beta as well as a few new exciting ones. Download this release You can download the WebJobs SDK [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/408"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}