Share via


QueueClient.RetrieveMultiple Method (Int32)

[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Retrieves up to the specified number of messages from the queue.

Namespace: Microsoft.ServiceBus
Assembly: Microsoft.ServiceBus (in microsoft.servicebus.dll)

Usage

    Dim instance As QueueClient
Dim maxMessages As Integer
Dim returnValue As IEnumerable(Of Message)

returnValue = instance.RetrieveMultiple(maxMessages)

Syntax

'Declaration
Public Function RetrieveMultiple ( _
    maxMessages As Integer _
) As IEnumerable(Of Message)
public IEnumerable<Message> RetrieveMultiple (
    int maxMessages
)
public:
IEnumerable<Message^>^ RetrieveMultiple (
    int maxMessages
)
public IEnumerable<Message> RetrieveMultiple (
    int maxMessages
)
public function RetrieveMultiple (
    maxMessages : int
) : IEnumerable<Message>

Parameters

  • maxMessages
    The maximum number of messages to retrieve from the queue. The service may return fewer than the indicated number of messages to balance timeliness of retrieval and bandwidth concerns even if the queue holds more messages than the indicated maximum number.

Return Value

Returns a IEnumerable that contains the messages.

Remarks

The method blocks until at least one message can be retrieved from the queue.

The operation requires ‘Listen’ permission on the Queue.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008, and Windows 2000

Target Platforms

See Also

Reference

QueueClient Class
QueueClient Members
Microsoft.ServiceBus Namespace