So, I was able to get my dead-letter service pulling from the queue when using NetMsmqBinding. However, when I switched to using MsmqIntegrationBinding to push messages to the target queue, the dead-letter queue no longer sends to the dead-letter service. The messages are no longer WCF-formatted – they are just XML serialized. I’m not sure how to get the piping setup to send to the new service. The queue and URL still match.
I’ve tried running as it was (with netMsmqBinding), switching to msmqIntegrationBinding, and specifying the serializationFormat as below:
<bindings>
<msmqIntegrationBinding>
<binding exactlyOnce="true" durable="true" serializationFormat="Xml">
<security mode="Transport" />
</binding>
</msmqIntegrationBinding>
</bindings>
However, none of this seems to work. Any ideas would be welcome.
After enabling WCF tracing (with
switchValue="All"), I was able to see that I was getting the following Exception:After finding the right contract to which to add
ServiceKnownTypefor each of my Types, I encountered this further Exception:From Simon Evans’ Blog, we find the following information:
Basically, as we’ve seen in the MSDN example, using MsmqIntegrationBinding requires one operation that accepts all messages (
Action = "*"[or, really,Action = ""would probably work as well]). Once I switched to msmqIntegrationBinding and switched my contract (ensuring I still hadServiceKnownTypeon the new one), everything started working.