# IAsyncBatchObservable&lt;T&gt; Methods

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

## SubscribeAsync(IAsyncBatchObserver&lt;T&gt;) {#subscribeasync-orleans-streams-iasyncbatchobserver-t-d14c1608}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iasyncbatchobservable-1/methods/subscribeasync-orleans-streams-iasyncbatchobserver-t-d14c1608/)

```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.

## SubscribeAsync(IAsyncBatchObserver&lt;T&gt;, StreamSequenceToken?) {#subscribeasync-orleans-streams-iasyncbatchobserver-t-orleans-streams-streamseque-f5f10d6a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.iasyncbatchobservable-1/methods/subscribeasync-orleans-streams-iasyncbatchobserver-t-orleans-streams-streamseque-f5f10d6a/)

```csharp
public abstract Task<StreamSubscriptionHandle<T>> SubscribeAsync(IAsyncBatchObserver<T> observer, StreamSequenceToken? token)
```

Subscribe a consumer to this batch observable.

### Parameters

- `observer` (`IAsyncBatchObserver<T>`): The asynchronous batch observer to subscribe.
- `token` (`StreamSequenceToken?`): The stream sequence to be used as an offset to start the subscription from.

### 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.
