2011-02-10 85 views
0

出版商配置 发布消息无法到达用户

<!-- 1. In order to configure remote endpoints use the format: "[email protected]" 
     2. Input queue must be on the same machine as the process feeding off of it. 
     3. Error queue can (and often should) be on a different machine. 
     4. The community edition doesn't support more than one worker thread. 
    --> 

    <MsmqTransportConfig 
    InputQueue="HomeOfficePublisherQueue" 
    ErrorQueue="error" 
    NumberOfWorkerThreads="1" 
    MaxRetries="5" 
    UseJournalQueue="true" 
    /> 

    <DBSubscriptionStorageConfig> 
    <NHibernateProperties> 
     <add Key="connection.provider" 
      Value="NHibernate.Connection.DriverConnectionProvider"/> 
     <add Key="connection.driver_class" 
      Value="NHibernate.Driver.SqlClientDriver"/> 
     <add Key="connection.connection_string" 
      Value="Server=<dbserver>\corpdev;initial catalog=NServiceBus;Integrated Security=SSPI"/> 
     <add Key="dialect" 
      Value="NHibernate.Dialect.MsSql2005Dialect"/> 
    </NHibernateProperties> 
    </DBSubscriptionStorageConfig> 

    <UnicastBusConfig 
    DistributorControlAddress="" 
    DistributorDataAddress="" 
    ForwardReceivedMessagesTo=""> 
    <MessageEndpointMappings> 
    </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> 

    <!-- 1. In order to configure remote endpoints use the format: "[email protected]" 
     2. Input queue must be on the same machine as the process feeding off of it. 
     3. Error queue can (and often should) be on a different machine. 
     4. The community edition doesn't support more than one worker thread. 
    --> 

    <MsmqTransportConfig 
    InputQueue="[email protected]<subscriberServer>" 
    ErrorQueue="error" 
    NumberOfWorkerThreads="1" 
    MaxRetries="5" 
    UseJournalQueue="true" 
    /> 

    <UnicastBusConfig> 
    <MessageEndpointMappings> 
     <add Messages="Message" Endpoint="[email protected]<publisherServer>" /> 
    </MessageEndpointMappings> 
    </UnicastBusConfig> 

</configuration> 

当我从不同势机器上运行的酒吧和子,从发行该消息不到达用户。如果我在同一台机器上运行它们,它们工作正常。

=>发布者在本机上运行,​​发布者队列在本地创建。

=>用户正在其上运行的机器相同。

配置文件是生产配置,日志文件中没有例外。

任何线索为什么消息被丢弃。 Thsnks求救...

+0

一些与标签错误,请将服务器读为“=>发布服务器在此计算机上运行,​​并且发布服务器队列在本地创建。 =>用户正在其上运行的机器相同。 – singhsa 2011-02-10 01:50:34

回答

0

检查发布服务器上的内部出站队列。如果您看到消息,则表示无法与订阅服务器通信。这通常意味着您可能没有运行MSDTC或未正确配置MSDTC的安全性。确保在MSDTC安全设置中设置了“允许入站”和“允许出站”。

+0

只是为了确认,在发布商的内部出站队列是MsmqTransportConfig即下 我启用了Journalling,当发布者启动时,我可以在日记队列中看到最初的消息,但我没有看到后续消息。我检查了MSDTC,它配置正确。 – singhsa 2011-02-10 15:27:57

0

我想在我的工作中将我的鼠标夹在某人身上。

对我来说,问题是我试图发送一个普通的poco类作为我的消息。
的app.config

<UnicastBusConfig ForwardReceivedMessagesTo="audit"> 
    <MessageEndpointMappings> 
     <add Assembly="Messages" Endpoint="pub" /> 
    </MessageEndpointMappings> 
    </UnicastBusConfig> 

后来我想也许我需要告诉什么对象应该是,所以我配置的消息作为消息

Configure.With() 
.DefiningMessagesAs(t => t.Namespace != null && t.Namespace.Contains("Messages")); 

仍然没有工作,所以然后咧嘴一笑我改成了这个

Configure.With() 
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains("Messages")); 

现在它工作正常