# IAsyncBatchObservable&lt;T&gt;.SubscribeAsync(IAsyncBatchObserver&lt;T&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iasyncbatchobservable-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iasyncbatchobservable-1/methods/)

```csharp
public abstract Task<StreamSubscriptionHandle<T>> SubscribeAsync(IAsyncBatchObserver<T> observer)
```

Subscribe a consumer to this batch observable.

### Parameters

- `observer` (`IAsyncBatchObserver<T>`): The asynchronous batch observer to subscribe.

### Returns

A promise for a StreamSubscriptionHandle that represents the subscription. The consumer may unsubscribe by using this handle. The subscription remains active for as long as it is not explicitly unsubscribed.
