public void Run(BrokeredMessage message) { // do some local data processing // processing done, let's notify the server var serverNotification = new BrokeredMessage("Processed local data notification."); serverNotification.Properties["processedMessageId"] = message.MessageId; serverNotification.Properties["aliqcomms"] = "aliqworkernotification"; MessageBroadcaster.Broadcast(serverNotification); }
public void Run(BrokeredMessage message) { Console.WriteLine(String.Format("Message body: {0}", message.GetBody <String>())); Console.WriteLine(String.Format("Message id: {0}", message.MessageId)); var fileList = (String)message.Properties["fileList"]; var downloadLink = string.Empty; // check if requested files are available // upload if available and set the downloadLink to uploaded spot var uploadNotification = new BrokeredMessage("Data uploaded notification to requesting worker"); uploadNotification.Properties["requestMessageId"] = message.MessageId; uploadNotification.Properties["downloadLink"] = downloadLink; MessageBroadcaster.Broadcast(uploadNotification); }