Index for bindings in this series:
It's been a while since the last article in the series on standard bindings, but there are only two left to go so I wanted to finish the series off. These last two bindings are a bit different than the others due to their specialization. Today is the standard binding for MSMQ and tomorrow is the standard binding for PeerChannel.
Microsoft Message Queuing (MSMQ) is a durable queue service that comes with Windows. MSMQ is the only transport included by default in WCF that is durable and that has asynchronous delivery of messages. You'll need to install message queuing support to actually operate your own queue, although you can create an instance of the binding even if the components are not present.
Standard binding standard disclaimer:
I've cut down on the number of properties presented by eliminating duplicates between the binding settings and binding element settings. For instance, the XML reader quotas can be set on either the binding or the message encoder binding element, but I'm only going to show them on the message encoder. I've also omitted most of the security credential settings because they're very messy and you hopefully won't need to change them much.
MSMQ supports both transport and message security and has the additional capability of being able to turn both on at the same time. I'll start though by showing what the binding looks like with security disabled.
MaxReadPoolSize: 64MaxSessionSize: 2048MaxWritePoolSize: 16ReaderQuotas: MaxArrayLength: 16384 MaxBytesPerRead: 4096 MaxDepth: 32 MaxNameTableCharCount: 16384 MaxStringContentLength: 8192
CustomDeadLetterQueue: DeadLetterQueue: SystemDurable: TrueExactlyOnce: TrueManualAddressing: FalseMaxBufferPoolSize: 524288MaxPoolSize: 8MaxReceivedMessageSize: 65536MaxRetryCycles: 2MsmqTransportSecurity: MsmqAuthenticationMode: None MsmqEncryptionAlgorithm: RC4Stream MsmqProtectionLevel: None MsmqSecureHashAlgorithm: Sha1QueueTransferProtocol: NativeReceiveErrorHandling: FaultReceiveRetryCount: 5RetryCycleDelay: 00:30:00Scheme: net.msmqTimeToLive: 1.00:00:00TransactedReceiveEnabled: TrueUseActiveDirectory: FalseUseMsmqTracing: FalseUseSourceJournal: False
This binding contains very few entries and all of the queuing configuration settings are available directly off of the transport binding element. There are no additional settings provided at the binding level besides the typical ones you see on all bindings.
CloseTimeout: 00:01:00EnvelopeVersion: Soap12 (http://www.w3.org/2003/05/soap-envelope)Namespace: http://tempuri.org/OpenTimeout: 00:01:00ReceiveTimeout: 00:10:00SendTimeout: 00:01:00
The MSMQ transport channel provides transport-level security itself so there is no change to the channel stack when transport security is enabled.
Adding message security does put a new element in the channel stack, but since there's no change when transport security is enabled, the channel stack looks the same whether the security mode is Message or Both.
Next time: Inside the Standard Bindings: NetPeerTcp