This documentation is archived and is not being maintained.

IContextChannel.AllowOutputBatching Property

Gets or sets a value that instructs Windows Communication Foundation (WCF) to store a set of messages before giving the messages to the transport.

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

bool AllowOutputBatching { get; set; }

Property Value

Type: System.Boolean
true if the batching of outgoing messages is allowed; otherwise, false.

The level of batching affects the performance of the system. When you set the value to true, you are instructing the system to hold on to this message in a local buffer to send out with other serialized messages if possible. Set the AllowOutputBatching property to true if message throughput is important; set it to false if reducing latency is important. There are other knobs used to manage the batching of messages that are accessible from the binding elements used to configure a service. Properties common to connection-oriented transports such as TCP and named pipes that are used to tune performance are located, for example, on the ConnectionOrientedTransportBindingElement. The MaxOutputDelay is used to set the maximum interval of time that a chunk of a message or a full message can remain buffered in memory before being sent out and the ConnectionBufferSize determines the size of this local buffer, as well as the buffer sizes used by the underlying network objects.

The value of AllowOutputBatching does not override the value of the AllowOutputBatching property that is set at the channel level. For example, if AllowOutputBatching is set to true for a particular message, that message is sent immediately regardless of the value of AllowOutputBatching.


All request/reply messages are sent immediately regardless of the value of AllowOutputBatching.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0