# AsyncObservableExtensions.SubscribeAsync(IAsyncObservable&lt;T&gt;, IAsyncObserver&lt;T&gt;, StreamSubscriptionStartPosition, string?)

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

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Streaming/Extensions/AsyncObservableExtensions.cs#L33-L47)

```csharp
public static Task<StreamSubscriptionHandle<T>> SubscribeAsync<T>(this IAsyncObservable<T> obs, IAsyncObserver<T> observer, StreamSubscriptionStartPosition startPosition, string? filterData = null)
```

Subscribe a consumer to this observable using the specified initial position.

### Parameters

- `obs` (`IAsyncObservable<T>`): The observable.
- `observer` (`IAsyncObserver<T>`): The asynchronous observer to subscribe.
- `startPosition` (`StreamSubscriptionStartPosition`): The initial subscription position.
- `filterData` (`string?`): Data object that will be passed to the filter.

### Returns

A promise for a `Orleans.Streams.StreamSubscriptionHandle-1` that represents the subscription.
