# IAsyncObservable&lt;T&gt;.SubscribeAsync(IAsyncObserver&lt;T&gt;)

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

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

Subscribe a consumer to this observable.

### Parameters

- `observer` (`IAsyncObserver<T>`): The asynchronous 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.
