0

I have a virtual machine on Azure which will listen to messages over the servicebus of Azure. And another developer needs to connect to this servicebus to send messages to my service. To do so, we need to come up with some protocol for this communication system. And I was thinking about using WSDL to make the server something webservice-like, but instead of listening to the standard HTTP ports it would connect to the service bus and within it a topic with subscription, or whatever. I'm still not sure what would be best.

So, is it possible? Has anyone done something similar before? Are there some examples?

4

1 回答 1

1

服务总线提供代理和中继消息传递模型。通过使用主题/队列,您实际上是在向/从代理发送和接收消息。因此,您可以使用代理支持的 API/协议。例如,您可以使用NetMessagingBinding来自您的服务/客户端的 来通过队列发送和接收消息。BrokeredMessage除了您在body 和 properties 值中输入的内容之外,这里没有任何合同。任一端的应用程序都可以根据需要解码/解密该信息。

然而,在中继消息传递的情况下,您正在客户端和服务之间建立端到端连接,服务总线充当身份验证、位置透明度甚至负载平衡之间的代理。因此,您可以在此处使用多种方式,RelayBindings例如,NetTcpRelayBindingwebHttpRelayBinding客户端和服务都需要同时可用。在这里,您需要服务和客户端使用相同的合同。

于 2013-06-21T01:09:47.897 回答