2011-06-13 72 views
1

我有PubSub示例与中间经销商合作 - 所有这些都在我的本地机器上。现在我试图让分销商进入另一台机器并遇到麻烦。订户似乎正在通过分销商向发布商进行注册(我在发布商中添加了日志声明,告诉我订阅者的数量并且给了我正确的价值),但订阅者没有得到任何发布活动。我究竟做错了什么?我需要为不同的队列提供一些权限吗? 我这里还有我的配置文件:NServiceBus:PubSub与分销商在发布商和订阅者不同的机器上

出版商

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
    <section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" /> 
    <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" /> 
    </configSections> 

    <MsmqTransportConfig InputQueue="MyPublisherInputQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> 

    <UnicastBusConfig DistributorControlAddress="" 
    DistributorDataAddress="" 
    ForwardReceivedMessagesTo=""> 
    <MessageEndpointMappings> 
     <add Messages="MyMessages" Endpoint="[email protected]" /> 
    </MessageEndpointMappings> 
    </UnicastBusConfig> 

</configuration> 

用户

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
    <section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" /> 
    <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" /> 
    </configSections> 

<MsmqTransportConfig 
    InputQueue="Subscriber1InputQueue_1" 
    ErrorQueue="error" 
    NumberOfWorkerThreads="1" 
    MaxRetries="5" 
    /> 

    <UnicastBusConfig DistributorControlAddress="[email protected]" DistributorDataAddress="[email protected]"> 
    <MessageEndpointMappings> 
     <add Messages="MyMessages" Endpoint="MyPublisherInputQueue" /> <!-- I've also tried this with [email protected] --> 
    </MessageEndpointMappings> 
    </UnicastBusConfig> 

</configuration> 

发行

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <appSettings> 
    <add key="NumberOfWorkerThreads" value="1"/> 

    <add key="DataInputQueue" value="distributorDataBus"/> 
    <add key="ControlInputQueue" value="distributorControlBus"/> 
    <add key="ErrorQueue" value="error"/> 
    <add key="StorageQueue" value="distributorStorage"/> 

    <add key="NameSpace" value="http://www.UdiDahan.com"/> 
    <!-- relevant for a Serialization of "interfaces" or "xml" --> 

    <add key="Serialization" value="xml"/> 
    <!-- can be either "xml", or "binary" --> 
    </appSettings> 
</configuration> 

在上述配置中,分销商运行在名为“rosmi”的计算机上,发行商和订户在“rrajagop”上运行。

回答

0

找出问题所在:问题发生是因为计算机名称的nslookup指向了错误的IP地址 - 这是因为DHCP为计算机分配了不同的IP地址,但dns项需要一段时间才能更新。

+0

那么,你是如何解决这个问题的? – nano 2014-03-19 15:10:42

+0

我控制了两台机器,所以我在机器上做了一个dns缓存刷新。 – Rohith 2014-04-09 04:59:55