public void PutGetDelete() { var message = new MyMessage(); QueueStorage.DeleteQueue(QueueName); // deleting queue on purpose // (it's slow but necessary to really validate the retry policy) QueueStorage.Put(QueueName, message); var retrieved = QueueStorage.Get <MyMessage>(QueueName, 1).First(); Assert.AreEqual(message.MyGuid, retrieved.MyGuid, "#A01"); QueueStorage.Delete(retrieved); }
/// <summary>Put a message on a queue (derived from the message type T), but keep it invisible for a delay.</summary> public static void PutWithDelay <T>(this IQueueStorageProvider provider, T message, TimeSpan delay) { provider.Put(GetDefaultStorageName(typeof(T)), message, delay: delay); }
/// <summary>Put a message on a queue (derived from the message type T).</summary> public static void Put <T>(this IQueueStorageProvider provider, T message) { provider.Put(GetDefaultStorageName(typeof(T)), message); }