Large WCF messages through MSMQ are not processed

I have a Windows console application that hosts a WCF service that is read from MSMQ. When the message size reaches about 7k - 8k, the service reads it (i.e., it disappears from Q), but the corresponding function is not called. There were no exceptions. Does anyone have clues about what is happening or where to look to resolve this?

+3
source share
1 answer

I tracked the problem. In the app / service hosting .config file, add or change the maxStringContentLength attribute of the readerQuotas element, which is 8196 by default.

<bindings>
  <netMsmqBinding>
    <binding name="netMsmq">
      <security mode="None" />
      <readerQuotas
        maxDepth="32"
        maxStringContentLength="8196"
        maxArrayLength="16384"
        maxBytesPerRead="4096"
        maxNameTableCharCount="16384"
        />
    </binding>
  </netMsmqBinding>
</bindings>
+2
source

All Articles