Example #1
0
        public void Send(string queue, string message)
        {
            if (!Initialized)
            {
                throw new NotInitializedException();
            }

            if (!Queues.Contains(queue))
            {
                throw new QueueDoesntExistException();
            }

            var body = Encoding.UTF8.GetBytes(message);

            ConnectionModel.BasicPublish(exchange: "",
                                         routingKey: queue,
                                         basicProperties: null,
                                         body: body);
        }