[英]How to read message from windows server service bus using wcf?
我正在使用Windows Server Service Bus上發布xml
BrokeredMessage message = new BrokeredMessage("Xml as string");
嘗試如下讀取wcf服務
//System.ServiceModel.Channels.Message
public void TopicReader(Message message)
{
}
配置設置為
<bindings>
<netMessagingBinding>
<binding name="messagingBinding" closeTimeout="00:03:00" openTimeout="00:03:00"
receiveTimeout="00:03:00" sendTimeout="00:03:00" sessionIdleTimeout="00:01:00"
prefetchCount="-1">
<transportSettings batchFlushInterval="00:00:01" />
</binding>
</netMessagingBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="securityBehavior">
<transportClientEndpointBehavior>
<tokenProvider>
<windowsAuthentication>
<stsUris>
<stsUri value="https://MahindeName/Namespace" />
</stsUris>
</windowsAuthentication>
</tokenProvider>
</transportClientEndpointBehavior>
</behavior>
端點名=“ TopicReader” listenUri =“ sb:// MahindeName / Namespace / TopicName / subscriptions / Sub” address =“ sb:// MahindeName / Namespace / TopicName” binding =“ netMessagingBinding” bindingConfiguration =“ messagingBinding” contract =“ Service .ITopicReader“ behaviorConfiguration =” securityBehavior“
服務正在托管,沒有任何錯誤,但是我們無法接收到消息,並且傳遞計數正在增加。
根據我的經驗,在接收之前,您需要掌握很多東西。 我的建議是也嘗試使用WCF進行發布,一旦您能夠通過wcf成功發布,則該配置也很適合接收。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.