赞
踩
ConnectionFactory factory = new ConnectionFactory { HostName = "localhost", Port = 5672, UserName = "admin",Password = "ADMIN", VirtualHost = "admin" }; using (IConnection conn = factory.CreateConnection()) { using (IModel im = conn.CreateModel()) { im.QueueDeclare(queue: "admin", durable: false, exclusive: false, autoDelete: false, arguments: null); string message = textBox1.Text; var sendMessage = Encoding.UTF8.GetBytes(message); im.BasicPublish(exchange: "", routingKey: "admin", basicProperties: null,
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。