Created
December 19, 2016 21:55
-
-
Save sjwaight/10ac11fe91a9e0ff5b23ba6a3c3c6962 to your computer and use it in GitHub Desktop.
Demo of how to read an Event Hub / Stream Analytics / Service Bus message in an Azure Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.ServiceBus.Messaging; | |
| using Microsoft.ServiceBus; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| public static void Run(BrokeredMessage sbQueueItem, TraceWriter log) | |
| { | |
| var yourRecord = sbQueueItem.GetBody<string>(); | |
| var paymenRequest = JObject.Parse(yourRecord); | |
| var vendorId = paymenRequest.SelectToken("vendorId").ToString(); | |
| // use your data as you wish from here. | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment