Пример #1
0
        public void ClearQueue()
        {
            queue.Post("one");
            var cleared = queue.Clear();

            Assert.IsTrue(cleared);
            Assert.AreEqual(queue.Info().Size, 0);
        }
Пример #2
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();
        }
Пример #3
0
        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
            // });
        }