amqp协议对等 [英] amqp protocol peer to peer

查看:93
本文介绍了amqp协议对等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用amqpnetlite来对等发送消息.我使用以下代码: amqpnetlite点对点.我的问题是:我应该使用amqp经纪人吗?这里是确切的代码:

I have tried to use amqpnetlite to send message peer to peer. I use this code: amqpnetlite peer to peer. my question is: should I use an amqp broker for it? here the exact code:

string address = "amqp://guest:guest@127.0.0.1:5672";
Uri addressUri = new Uri(address);
ContainerHost host = new ContainerHost(new Uri[] { addressUri }, null, addressUri.UserInfo);
host.Open();

推荐答案

您不需要代理即可进行对等通信.您创建的ContainerHost是侦听器.客户端可以连接到它并开始发送/接收消息.

You do not need a broker for peer to peer communication. The ContainerHost you created is the listener. A client can connect to it and start sending/receiving messages.

这篇关于amqp协议对等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆