Available languages: [Python](https://databento.com/docs/api-live/client/resubscribe.python.md) · [C++](https://databento.com/docs/api-live/client/resubscribe.cpp.md) · [Rust](https://databento.com/docs/api-live/client/resubscribe.rust.md) · [Raw](https://databento.com/docs/api-live/client/resubscribe.raw.md)

Source: https://databento.com/docs/api-live/client/resubscribe


### LiveClient::resubscribe

Resubscribes only to active subscriptions, removing the original `start` time, if any.
Stored subscriptions and [unsubscriptions](https://databento.com/docs/api-live/client/unsubscribe.md) are replayed in the order they were sent.
Usually performed after calling [Live.reconnect](https://databento.com/docs/api-live/client/reconnect.md).

#### API method

```rust
async fn resubscribe(&mut self) -> crate::Result<()>;
```

#### Example usage

```rust
use databento::{
    LiveClient,
    dbn::{Dataset::IfeuImpact, SType, Schema},
    live::Subscription,
};

// Create a live client
let mut client = LiveClient::builder()
    .key("$YOUR_API_KEY")?
    .dataset(IfeuImpact)
    .build()
    .await?;
// Subscribe to the 1-minute bars for all BRN futures
client
    .subscribe(
        Subscription::builder()
            .schema(Schema::Ohlcv1M)
            .stype_in(SType::Parent)
            .symbols("BRN.FUT")
            .build(),
    )
    .await?;
// Reconnect and resend the previous subscription
client.reconnect().await?;
client.resubscribe().await?;
```
