匯出 (0) 列印
全部展開

PrefetchCount 屬性

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

命名空間:  Microsoft.ServiceBus.Messaging
組件:  Microsoft.ServiceBus (在 Microsoft.ServiceBus.dll 中)

public virtual 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();

社群新增項目

新增
顯示:
© 2014 Microsoft