2011-02-10 4 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

答えて

0

パブリッシャーの内部送信キューを確認してください。メッセージが表示された場合、これは加入者と通信できないことを意味します。これは通常、MSDTCを実行していないか、MSDTCのセキュリティが正しく構成されていない可能性があることを意味します。 MSDTCのセキュリティ設定で[受信を許可する]と[送信を許可する]が設定されていることを確認してください。

+0

だけを確認するために、出版社の内部送信キューが NumberOfWorkerThreads = "1" MaxRetriesの= "5" UseJournalQueue = "true" をMsmqTransportConfigすなわち 私はJournallingを有効にしました。パブリッシャーが起動したときにジャーナルキューに初期メッセージが表示されますが、後続のメッセージは表示されません。私はMSDTCをチェックし、正しく設定されています。 – singhsa

+0

パブリッシャのインバウンドキューでジャーナリングを使用すると、サブスクライバのサブスクリプションメッセージが到着したことだけが表示されます。MSMQの送信内部キュー(mmcの「送信キュー」)を確認する必要があります。パブリッシャとサブスクライバの両方のOSは何ですか? –

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")); 

にそれを変更するには今では正常に動作します

関連する問題