---
url: https://node-ts.github.io/bus/api/bus-core/interfaces/RetryStrategy.md
---
[API reference](../../index.md) / [@node-ts/bus-core](../index.md) / RetryStrategy

# Interface: RetryStrategy

Defined in: [packages/bus-core/src/retry-strategy/retry-strategy.ts:7](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-core/src/retry-strategy/retry-strategy.ts#L7)

Defines how a message retry strategy is to be implemented that calculates the delay between subsequent
retries of a message.

## Methods

### calculateRetryDelay()

```ts
calculateRetryDelay(currentAttempt): number;
```

Defined in: [packages/bus-core/src/retry-strategy/retry-strategy.ts:13](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-core/src/retry-strategy/retry-strategy.ts#L13)

Calculate the delay between retrying a failed message

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `currentAttempt` | `number` | How many attempts at handling the message have failed |

#### Returns

`number`

The number of milliseconds to delay retrying a failed message attempt
