Exportar (0) Imprimir
Expandir Tudo

Propriedade do RDL PrefetchCount

Obtém ou define a quantidade de mensagens que o receptor da mensagem pode solicitar simultaneamente.

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

function get PrefetchCount () : int
function set PrefetchCount (value : int)

Valor da propriedade

Tipo: System..::..Int32
A quantidade de mensagens que o receptor da mensagem pode solicitar simultaneamente.

This is a protected member of the abstract SubscriptionClient class. Abstract classes are not meant to be inherited, so protected members should be ignored.

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

Contribuições da comunidade

ADICIONAR
Mostrar:
© 2014 Microsoft