发布者消息未到达订阅者
发布者配置
<!-- 1. In order to configure remote endpoints use the format: "queue@machine"
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: "queue@machine"
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="VW_1140@<subscriberServer>"
ErrorQueue="error"
NumberOfWorkerThreads="1"
MaxRetries="5"
UseJournalQueue="true"
/>
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="Message" Endpoint="HomeOfficePublisherQueue@<publisherServer>" />
</MessageEndpointMappings>
</UnicastBusConfig>
</configuration>
当我从不同的机器运行发布和订阅时,来自发布者的消息不会到达订阅者。如果我在同一台机器上运行它们,它们就可以正常工作。
=>发布者正在该计算机上运行,并且发布者队列是在本地创建的。
相同
与=> 订阅者正在运行的机器。
该配置文件是生产环境,日志文件中没有异常。
消息被丢弃的任何线索。 感谢您的帮助...
Publisher config
<!-- 1. In order to configure remote endpoints use the format: "queue@machine"
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>
Subscriber config
<?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: "queue@machine"
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="VW_1140@<subscriberServer>"
ErrorQueue="error"
NumberOfWorkerThreads="1"
MaxRetries="5"
UseJournalQueue="true"
/>
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="Message" Endpoint="HomeOfficePublisherQueue@<publisherServer>" />
</MessageEndpointMappings>
</UnicastBusConfig>
</configuration>
When i run pub and sub from diffrent machines, the messages from publisher don't reach subscriber. If I run them on the same machine they work fine.
=> the publisher is running on this machine and publisher queue is created locally.
is same as
=> the machine on which subscriber is running.
The profile is production and there is no exception in the log file.
Any clues why messages are getting dropped.
Thsnks for the help...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查发布服务器上的内部出站队列。如果您在那里看到消息,则意味着它无法与订阅者通信。这通常意味着您可能没有运行 MSDTC,或者 MSDTC 的安全性配置不正确。确保您在 MSDTC 安全设置中设置了“允许入站”和“允许出站”。
Check the internal outbound queue on the Publisher. If you see messages there this means it can't communicate with the Subscriber. This usually means that you may not have MSDTC running or the security for MSDTC is not correctly configured. Make sure you have "Allow Inbound" and "Allow Outbound" set in the MSDTC security settings.
当我的鼠标工作时,我想把鼠标扔向某人。
对我来说,问题是我试图发送一个简单的 poco 类作为我的消息。
app.config
然后我想也许我需要告诉对象应该是什么,所以我将消息配置为消息
仍然不起作用,所以为了咧嘴一笑,我将其更改为
现在它工作正常
I wanted to chuck my mouse at someone when I got mine working.
For me, the problem was that I was trying to send a plain poco class as my message.
app.config
Then I thought maybe I need to tell what the object is supposed to be, so I configured the message as a message
Still didn't work, so then for grins i changed it to this
Now it works fine