# WantOptions

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/wantoptions/

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:72](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L72)

What a want asks for.

## Properties

### drainMs?

```ts
drainMs?: number;
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:107](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L107)

How long the old subscription keeps delivering its in-flight groups after a cutover, in milliseconds, as on
`switchTo`: 0 (the default) to 2147483647.

***

### generations?

```ts
generations?: boolean;
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:87](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L87)

Follow a supervised publisher: discover the namespaces one field below `namespace` and keep the subscription on
the newest generation announced there, moving when a newer one is announced or the current one is withdrawn.
The subscriber's token must allow discovering the root.

***

### namespace

```ts
namespace: readonly string[];
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:77](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L77)

The track's namespace. With `generations`, a supervised publisher's root instead: the want follows the newest
generation announced under it.

***

### parameters?

```ts
parameters?: MessageParameters;
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:81](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L81)

Message parameters sent on every SUBSCRIBE, such as a location filter or a delivery timeout.

***

### retry?

```ts
retry?: SupervisionBackoff;
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:95](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L95)

Backoff between resubscriptions. Default from 250 ms, doubling up to 8 s, with jitter.

***

### staleAfterMs?

```ts
staleAfterMs?: number;
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:93](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L93)

Resubscribe when no object arrived for this long, from acceptance or the last object. Only for tracks that are
never silent while live: a muted microphone or a camera that is off is silent on purpose. After a publisher
crash moq-relay can keep an accepted subscription on the dead publisher's cached object for about 11 s.

***

### track

```ts
track: string;
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:79](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L79)

Track name within the namespace.

***

### until?

```ts
until?: "first-object" | ((object) => boolean);
```

Defined in: [relay-sdks/ts/src/supervised-subscriber.ts:102](https://github.com/caprids/relay-sdks/blob/main/ts/src/supervised-subscriber.ts#L102)

When a move cuts over to its replacement subscription, as on `switchTo`: `'first-object'` (the default) or a
synchronous predicate on the replacement's objects. A move is a newer generation, or a re-want with another track
or parameters; the current subscription keeps delivering until then. Compare the object's own timeline with what
was delivered, never group IDs: each generation and track numbers its own groups.
