//HostName=服务器IP地址 //UserName=管理账户 默认guest //Password=账户密码 默认guest //Port=端口 默认5672 var factory = new ConnectionFactory() { HostName = "192.168.1.100", UserName = "guest", Password = "guest", Port = 5672 };