通过消费者去进行Exchange和Queue通过不同的RouteKey进行绑定
消费者1:
static void Main(string[] args) { ConnectionFactory factory = new ConnectionFactory() { HostName = "192.168.59.101", UserName = "admin", Password = "admin" }; string myexchange = "myexchange"; string myqueue = "myqueue"; using (var connection = factory.CreateConnection()) { var channel = connection.CreateModel(); channel.ExchangeDeclare(myexchange, ExchangeType.Direct, true, false, null