TransactedBatchingBehavior(Int32) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the TransactedBatchingBehavior class with the specified batch size.
public:
TransactedBatchingBehavior(int maxBatchSize);
public TransactedBatchingBehavior (int maxBatchSize);
new System.ServiceModel.Description.TransactedBatchingBehavior : int -> System.ServiceModel.Description.TransactedBatchingBehavior
Public Sub New (maxBatchSize As Integer)
Parameters
- maxBatchSize
- Int32
The maximum number of receive operations that can be batched together.
Exceptions
MaxBatchSize
is less than 0.
Examples
The following code shows how to create a new instance of TransactedBatchingBehavior specifying the maximum number of messages to be processed in a batch.
endpoint.Behaviors.Add(new TransactedBatchingBehavior(10));
Remarks
The maxBatchSize
value passed into the constructor is only a hint. It is possible that all messages are received before reaching the maxBatchSize
. When that occurs, it is unnecessary to wait indefinitely for another message to be received. To prevent this from happening, WCF commits the batch early and open a new batch to receive additional messages. The batch is committed if there are no messages to be received and 20 percent of the transaction time-out value has elapsed.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기