MtomMessageEncodingBindingElement.MaxWritePoolSize 屬性


取得或設定 XML 寫入器的數目上限,這些是配置於集區、準備用來處理傳出訊息的寫入器。Gets or sets the maximum number of XML writers that is allocated to a pool and are ready for use to process outgoing messages.

 property int MaxWritePoolSize { int get(); void set(int value); };
public int MaxWritePoolSize { get; set; }
member this.MaxWritePoolSize : int with get, set
Public Property MaxWritePoolSize As Integer


要保存在集區中的寫入器數目上限。The maximum number of writers to be kept in the pool. 預設值為 16 個寫入器。The default value is 16 writers.


這個值小於或等於零。The value is less than or equal to zero.


增加這個數字會增加記憶體消耗量,但是可讓編碼器做好處理傳出訊息量突然暴增的準備,因為編碼器可以使用集區中已經建立的寫入器,而不必建立新的寫入器。Increasing this number increases memory consumption, but prepares the encoder to deal with sudden bursts of outgoing messages because it is able to use writers from the pool that are already created instead of creating new ones.