SALG : 1-800-867-1389
EN
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.

QueueClient.PrefetchCount Property

 

Gets or sets the number of messages that the queue receiver can simultaneously request.

Namespace:   Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public int PrefetchCount { get; set; }

Property Value

Type: System.Int32

The number of messages that the queue receiver can simultaneously request.

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();
Return to top
Syntes du, dette var nyttigt?
(1500 tegn tilbage)
Tak for din feedback
Vis:
© 2015 Microsoft