# IQueueAdapterReceiver Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iqueueadapterreceiver/)

## GetQueueMessagesAsync(int) {#getqueuemessagesasync-int-ba1b1536}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iqueueadapterreceiver/methods/getqueuemessagesasync-int-ba1b1536/)

```csharp
public abstract Task<IList<IBatchContainer>> GetQueueMessagesAsync(int maxCount)
```

Retrieves batches from a message queue.

### Parameters

- `maxCount` (`int`): The maximum number of message batches to retrieve.

### Returns

The message batches.

## Initialize(TimeSpan) {#initialize-system-timespan-2596b2b8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iqueueadapterreceiver/methods/initialize-system-timespan-2596b2b8/)

```csharp
public abstract Task Initialize(TimeSpan timeout)
```

Initializes this receiver.

### Parameters

- `timeout` (`TimeSpan`)

### Returns

A `System.Threading.Tasks.Task` representing the operation.

## MessagesDeliveredAsync(IList&lt;IBatchContainer&gt;) {#messagesdeliveredasync-system-collections-generic-ilist-orleans-streams-ibatchco-e63c09ed}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iqueueadapterreceiver/methods/messagesdeliveredasync-system-collections-generic-ilist-orleans-streams-ibatchco-e63c09ed/)

```csharp
public abstract Task MessagesDeliveredAsync(IList<IBatchContainer> messages)
```

Notifies the adapter receiver that the messages were delivered to all consumers, so the receiver can take an appropriate action (e.g., delete the messages from a message queue).

### Parameters

- `messages` (`IList<IBatchContainer>`): The message batches.

### Returns

A `System.Threading.Tasks.Task` representing the operation.

## Shutdown(TimeSpan) {#shutdown-system-timespan-06c02708}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iqueueadapterreceiver/methods/shutdown-system-timespan-06c02708/)

```csharp
public abstract Task Shutdown(TimeSpan timeout)
```

Receiver is no longer used. Shutdown and clean up.

### Parameters

- `timeout` (`TimeSpan`)

### Returns

A `System.Threading.Tasks.Task` representing the operation.
