简体   繁体   English

消息队列服务消息未到达

[英]Message Queue service messages don't arrive

I've got this WCF service over message queuing. 我已经通过消息队列获得了这个WCF服务。

The service is configured like this: 该服务的配置如下:

  <service name="EmailServices.EmailService" behaviorConfiguration="serviceBehaviour">
    <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="mexEmailService" contract="IMetadataExchange" />
    <endpoint name="netMsmqEmailService" address="net.msmq://w2k8services/emailservices_w2k8services" contract="EmailServices.IEmailService"
            binding="netMsmqBinding" bindingConfiguration="netMsmq" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8008/EmailService" />
      </baseAddresses>
    </host>
  </service>

The binding like this 这样的绑定

  <netMsmqBinding>
    <binding name="netMsmq" exactlyOnce="true" receiveErrorHandling="Move" receiveTimeout="00:45:00" maxReceivedMessageSize="2147483647">
      <security mode="None" />
    </binding>   

Pretty basic message queue service which works fine locally 非常基本的消息队列服务,可以在本地正常工作

After generating a proxy and calling a function messages just do not arrive at the service. 生成代理并调用函数消息后,就不会到达该服务。 When stopping the service they won't come in any queue although sometimes you see one shortly appear in the outgoing queue of the client machine 停止服务时,它们不会进入任何队列,尽管有时您会很快看到一个出现在客户端计算机的传出队列中

A trace file says everything is ok, except that it cant see if the is transactional. 跟踪文件表示一切正常,但无法查看该文件是否具有事务性。 It is... 它是...

I have no clue what to try anymore, I would say it should work but it just isn't. 我不知道要尝试什么,我会说它应该可以工作,但事实并非如此。 What else can I try? 我还能尝试什么?

...sometimes you see one shortly appear in the outgoing queue of the client machine ...有时您会看到一则短消息出现在客户端计算机的传出队列中

This means that the client is successfully enqueuing the message and that the message is being transmitted from one machine to another (assuming this is a transactional queue - which it needs to be as you've specified "exactlyOnce" in your binding). 这意味着客户端已成功将消息放入队列,并且该消息正在从一台机器传输到另一台机器(假设这是一个事务性队列-它必须是您在绑定中指定的“ exactlyOnce”)。

So, assuming transactional queuing, the problem must be on the receiving side. 因此,假设事务性排队,问题一定在接收方。

The first thing to check is queue permissions. 首先要检查的是队列权限。 To receive a message, the service account running the service needs the following queue permissions: 要接收消息,运行服务的服务帐户需要以下队列权限:

  • Receive 接收
  • Peek 窥视
  • Get permissions 获取权限
  • Get properties 获取属性

If these are all granted, then the next thing is to enable msmq event logging . 如果所有这些都被授予,那么下一步就是启用msmq事件日志记录 You should be able to see an event for the message arrival on the machine. 您应该能够看到消息到达机器的事件。 Any problems after that you should be able to see using this log. 之后的任何问题都应该可以看到使用此日志。

Check the Length of the message you are trying to send. 检查您要发送的消息的长度。

WCF by default sends only 8192 Characters. 默认情况下,WCF仅发送8192个字符。

You need to change if you want to send more than 8192 Characters. 如果要发送8192个以上的字符,则需要进行更改。

I got similar issue and this worked for me. 我遇到了类似的问题,这对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM