RabbitMQ消息的发送和接收C#

上传者: iin22 | 上传时间: 2021-02-04 15:46:34 | 文件大小: 408KB | 文件类型: ZIP
ch.ExchangeDeclare(exchange, exchangeType);//direct必须要routingKey //声明一个队列 ch.QueueDeclare("q", true, false, false, null); //将一个队列和一个路由绑定起来。并制定路由关键字 // ch.QueueBind("q", exchange, routingKey); ch.ExchangeDeclare("fanoutE", "fanout"); //声明一个队列 ch.QueueDeclare("fanoutQ", true, false, false, null); //将一个队列和一个路由绑定起来。并制定路由关键字 //ch.QueueBind("q", "fanoutE", routingKey); ch.QueueBind("fanoutQ", "fanoutE", "fanoutk");//fanout模式publish的时候不需要routingKey,只要绑定了的Q都能接收

文件下载

资源详情

[{"title":"( 43 个子文件 408KB ) RabbitMQ消息的发送和接收C#","children":[{"title":"RabbitMQ测试","children":[{"title":"RabbitMQSender - 副本","children":[{"title":"RabbitMQSender.v11.suo <span style='color:#111;'> 35.50KB </span>","children":null,"spread":false},{"title":"RabbitMQSender","children":[{"title":"RabbitMQSender.csproj <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 3.09KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":true},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"RabbitMQSender.csprojResolveAssemblyReference.cache <span style='color:#111;'> 6.06KB </span>","children":null,"spread":false},{"title":"RabbitMQSender.exe <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"RabbitMQSender.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"RabbitMQSender.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.69KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"RabbitMQSender.exe <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"RabbitMQ.Client.dll <span style='color:#111;'> 554.00KB </span>","children":null,"spread":false},{"title":"RabbitMQSender.vshost.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"RabbitMQSender.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"RabbitMQSender.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"RabbitMQSender.vshost.exe <span style='color:#111;'> 22.45KB </span>","children":null,"spread":false},{"title":"RabbitMQSender.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"RabbitMQSender.sln <span style='color:#111;'> 932B </span>","children":null,"spread":false}],"spread":true},{"title":"RabbitMQServer","children":[{"title":"RabbitMQServer.v11.suo <span style='color:#111;'> 32.50KB </span>","children":null,"spread":false},{"title":"RabbitMQServer.sln <span style='color:#111;'> 932B </span>","children":null,"spread":false},{"title":"RabbitMQServer","children":[{"title":"Program.cs <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":true},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"RabbitMQServer.csproj <span style='color:#111;'> 2.94KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"RabbitMQServer.exe <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"RabbitMQServer.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.64KB </span>","children":null,"spread":false},{"title":"RabbitMQServer.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"RabbitMQServer.csprojResolveAssemblyReference.cache <span style='color:#111;'> 24.62KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"RabbitMQServer.exe <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"RabbitMQServer.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"RabbitMQ.Client.dll <span style='color:#111;'> 554.00KB </span>","children":null,"spread":false},{"title":"RabbitMQ.ServiceModel.dll <span style='color:#111;'> 26.50KB </span>","children":null,"spread":false},{"title":"RabbitMQServer.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"RabbitMQServer.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"RabbitMQServer.vshost.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"RabbitMQServer.vshost.exe <span style='color:#111;'> 22.45KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • tracy_zhw :
    感谢分享,还可以吧
    2020-06-12
  • ll_efort :
    还要用用,没有做过的设计和封装,一般。
    2017-05-10
  • Secret_Garden_Adagio :
    可以用的。有接收和发送。不过有direct,我其实想找topic的。不过也学习到了。
    2017-04-07
  • hbgdluck :
    看到了一句我很想要的代码,获取指定队列中的一调数据BasicGetResult result = channel.BasicGet(&quot;MyRabbitMQ&quot;, true);
    2016-12-07
  • flydoos :
    @youbaozang:感谢分享了,好用
    2016-09-13

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明