Created
January 25, 2017 19:46
-
-
Save jeroenmaes/e1b986b1f2907fb0fc5c0fc18578cf3a to your computer and use it in GitHub Desktop.
This file contains 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
#r "Microsoft.ServiceBus" | |
using Microsoft.ServiceBus.Messaging; | |
using Microsoft.ServiceBus; | |
using System; | |
using System.Threading.Tasks; | |
public static void Run(BrokeredMessage myQueueItem, TraceWriter log, out BrokeredMessage outputSbMsg) | |
{ | |
var msgBody = GetMessageBodyString(myQueueItem); | |
log.Info($"MessageBody: {msgBody}"); | |
var result = DecideReprocessNeeded(msgBody); | |
log.Info($"ReprocessNeeded: {result}"); | |
if(result == true) | |
{ | |
outputSbMsg = ConstructNewMessage(msgBody); | |
log.Info($"Message resubmitted to queue."); | |
} | |
else | |
{ | |
outputSbMsg = null; | |
log.Info($"Message deleted from queue."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment