匯出 (0) 列印
全部展開
本主題尚未接受評分 - 為這個主題評分

PrefetchCount 屬性

取得或設定佇列接收者可以同時要求的訊息數目。

命名空間:  Microsoft.ServiceBus.Messaging
組件:  Microsoft.ServiceBus (在 Microsoft.ServiceBus.dll 中)
public int PrefetchCount { get; set; }

屬性值

型別:System..::..Int32
佇列接收者可以同時要求的訊息數目。

You can use PrefetchCount to fetch multiple messages from the server in the same round-trip. This can be useful in scenarios that need lower latency for receiving existing messages from a queue or subscription. Prefetch can also improve throughput depending upon the scenarios as the number of round-trips to the server are reduced.

Prefetch is disabled by default. You can enable it by using this property on the client. You must set PrefetchCount before receiving the first message.

QueueClient client = factory.CreateQueueClient("queue1");
client.PrefetchCount = 200;

BrokeredMessage message = client.Receive();
本文對您有任何幫助嗎?
(剩餘 1500 個字元)
感謝您提供意見

社群新增項目

新增
顯示:
© 2014 Microsoft. 著作權所有,並保留一切權利。