MessageQueue.MaximumQueueSize Propriedade
Definição
Obtém ou define o tamanho máximo da fila.Gets or sets the maximum size of the queue.
public:
property long MaximumQueueSize { long get(); void set(long value); };
[System.ComponentModel.TypeConverter(typeof(System.Messaging.Design.SizeConverter))]
[System.Messaging.MessagingDescription("MQ_MaximumQueueSize")]
public long MaximumQueueSize { get; set; }
[System.Messaging.MessagingDescription("MQ_MaximumQueueSize")]
public long MaximumQueueSize { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Messaging.Design.SizeConverter))>]
[<System.Messaging.MessagingDescription("MQ_MaximumQueueSize")>]
member this.MaximumQueueSize : int64 with get, set
[<System.Messaging.MessagingDescription("MQ_MaximumQueueSize")>]
member this.MaximumQueueSize : int64 with get, set
Public Property MaximumQueueSize As Long
Valor da propriedade
O tamanho máximo, em quilobytes, da fila.The maximum size, in kilobytes, of the queue. O padrão do Enfileiramento de Mensagens especifica que não há limite.The Message Queuing default specifies that no limit exists.
- Atributos
Exceções
O tamanho máximo da fila contém um valor negativo.The maximum queue size contains a negative value.
Erro ao acessar um método do serviço de Enfileiramento de Mensagens.An error occurred when accessing a Message Queuing method.
Exemplos
O exemplo de código a seguir obtém e define o valor da propriedade de uma fila de mensagens MaximumQueueSize .The following code example gets and sets the value of a message queue's MaximumQueueSize property.
// Set the queue's MaximumQueueSize property value.
queue.MaximumQueueSize = 10;
// Display the new value of the queue's MaximumQueueSize property.
Console.WriteLine("MessageQueue.MaximumQueueSize: {0}",
queue.MaximumQueueSize);
Comentários
O MaximumQueueSize fornece acesso ao limite de armazenamento de mensagens do enfileiramento de mensagens, que é separado da cota de mensagens do computador que o administrador define.The MaximumQueueSize provides access to the Message Queuing message storage limit, which is separate from the computer's message quota that the administrator defines. Para obter mais informações sobre a cota de mensagens, consulte MaximumJournalSize .For more information about the message quota, see MaximumJournalSize.
Definir essa propriedade modifica a fila do serviço de enfileiramento de mensagens.Setting this property modifies the Message Queuing queue. Portanto, todas as outras MessageQueue instâncias são afetadas pela alteraçãoTherefore, any other MessageQueue instances are affected by the change
Se for feita uma tentativa de exceder o tamanho máximo da fila ou a cota de mensagens do computador, as mensagens poderão ser perdidas.If an attempt is made to exceed either the maximum queue size or the computer message quota, messages might be lost. Quando a cota de fila é atingida, o serviço de enfileiramento de mensagens notifica a fila de administração do aplicativo de envio para indicar que a fila está cheia, retornando uma mensagem de confirmação negativa.When the queue quota is reached, Message Queuing notifies the administration queue of the sending application to indicate that the queue is full, by returning a negative acknowledgment message. O enfileiramento de mensagens continua a enviar confirmações negativas até que o tamanho total das mensagens na fila fique abaixo do limite.Message Queuing continues to send negative acknowledgments until the total size of the messages in the queue drops below the limit.
A tabela a seguir mostra se essa propriedade está disponível em vários modos de grupo de trabalho.The following table shows whether this property is available in various Workgroup modes.
| Modo de grupo de trabalhoWorkgroup mode | DisponívelAvailable |
|---|---|
| Computador localLocal computer | YesYes |
| Computador local e nome de formato diretoLocal computer and direct format name | YesYes |
| Computador remotoRemote computer | NãoNo |
| Computador remoto e nome de formato diretoRemote computer and direct format name | NãoNo |