Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ReceiveContextEnabled Property

MsmqElementBase.ReceiveContextEnabled Property

.NET Framework 4.6 and 4.5

Gets or sets a value that specifies if receive context for processing messages in queues is enabled.

Namespace:  System.ServiceModel.Configuration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

[ConfigurationPropertyAttribute("receiveContextEnabled", DefaultValue = true)]
public bool ReceiveContextEnabled { get; set; }

Property Value

Type: System.Boolean
true if receive context for processing messages in queues is enabled; otherwise, false.

When this is true, a service can “peek” a message on the queue to begin processing it, and, if anything goes wrong and an exception is thrown, it remains on the queue. Services can also “lock” messages in order to retry processing at a later point in time. ReceiveContext provides a mechanism for “completing” the message once processed so it can be removed from the queue. Messages are no longer being read and re-written to queues over the network, and individual messages aren’t bouncing across different service instances during processing.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
© 2015 Microsoft