public void SaveMessage(Product.API.Model.QueueMessage message) { string Jsonmessage = JsonConvert.SerializeObject(message); if (queueClient.Exists()) { queueClient.SendMessage(Jsonmessage); } }
public void UpdateMessage(Product.API.Model.QueueMessage messages) { if (queueClient.Exists()) { // Get the message from the queue Azure.Storage.Queues.Models.QueueMessage[] message = queueClient.ReceiveMessages(); string Jsonmessage = JsonConvert.SerializeObject(messages); // Update the message contents queueClient.UpdateMessage(message[0].MessageId, message[0].PopReceipt, Jsonmessage, TimeSpan.FromSeconds(60.0) // Make it invisible for another 60 seconds ); } }