> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# MemoryDurability

> Class exported by @botmesh/core.

Defined in: [durability/memory.ts:20](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/memory.ts#L20)

In-process durability backend — the default of `BotConfig.durability` and the
reference implementation of the journal contract.

It gives retries, backoff, the dead-letter queue and idempotent sends within one
process, but everything it holds is lost when the process dies: use
`FileDurability` (single process) or a store-backed backend
(`@botmesh/postgres-store`, `@botmesh/redis-store`) to survive a crash.

## Extends

* [`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability)

## Constructors

### Constructor

```ts theme={null}
new MemoryDurability(): MemoryDurability;
```

Defined in: [durability/memory.ts:21](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/memory.ts#L21)

#### Returns

`MemoryDurability`

#### Overrides

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`constructor`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#constructor)

## Properties

### inbox

```ts theme={null}
readonly inbox: InboxJournal;
```

Defined in: [durability/journal.ts:383](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L383)

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`inbox`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#inbox)

***

### outbox

```ts theme={null}
readonly outbox: OutboxJournal;
```

Defined in: [durability/journal.ts:384](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L384)

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`outbox`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#outbox)

***

### exclusive

```ts theme={null}
readonly exclusive: boolean;
```

Defined in: [durability/journal.ts:385](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L385)

`true` when only one process can use the backend at a time (memory, file). A restarted
process then knows every lease of its `instanceId` is its own dead incarnation's.

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`exclusive`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#exclusive)

***

### scopeName

```ts theme={null}
readonly scopeName: string | undefined;
```

Defined in: [durability/journal.ts:387](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L387)

The scope of this view (`undefined` = the unscoped tables).

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`scopeName`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#scopename)

***

### kv

```ts theme={null}
readonly kv: DurableKv;
```

Defined in: [durability/journal.ts:388](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L388)

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`kv`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#kv)

## Methods

### scope()

```ts theme={null}
scope(name): KvDurability;
```

Defined in: [durability/journal.ts:397](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L397)

A view over the same KV holding only the records of `name` (tables `inbox:<name>` / `outbox:<name>`).

#### Parameters

| Parameter | Type |
| - | - |
| `name` | `string` |

#### Returns

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability)

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`scope`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#scope)

***

### start()

```ts theme={null}
start(): Promise<void>;
```

Defined in: [durability/journal.ts:402](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L402)

Called by `bot.start()` before anything is replayed.

#### Returns

`Promise`\<`void`>

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`start`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#start)

***

### stop()

```ts theme={null}
stop(): Promise<void>;
```

Defined in: [durability/journal.ts:403](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/journal.ts#L403)

Called by `bot.stop()` after the provider stopped.

#### Returns

`Promise`\<`void`>

#### Inherited from

[`KvDurability`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability).[`stop`](https://botmesh.afaya.com.co/api/core/spi/classes/KvDurability#stop)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.