public void ClearQueue() { queue.Post("one"); var cleared = queue.Clear(); Assert.IsTrue(cleared); Assert.AreEqual(queue.Info().Size, 0); }
private static void ClearMessagesHotel() { IronMqRestClient ironMq = Client.New(new IronClientConfig { ProjectId = "5bf768af967e0f000910fed3", Token = "y7TU7c3D3IUXtwrcJJFH", Host = "mq-aws-eu-west-1-1.iron.io", ApiVersion = 3, Scheme = Uri.UriSchemeHttp }); QueueClient queueHabitacion = ironMq.Queue("Hotel"); queueHabitacion.Clear(); }
public void Init() { // Put your ".iron.json" file to home directory, eg. C:\Users\YourUsername ironMq = Client.New(); queue = ironMq.Queue(GetQueueName()); queue.Clear(); // Or config the client here: // ironMq = Client.New(new IronClientConfig // { // ProjectId = "xxxxxxxxxxxxxxxxxxxxxxxx", // Token = "yyyyyyyyyyyyyyyyyyyy", // Host = "host-of-ironmq.com", // ApiVersion = 3, // Port = 80, // Scheme = Uri.UriSchemeHttp // }); }