# memory

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: memory
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: buffers/memory
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: buffers/memory.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/buffers/memory.adoc
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/connect/components/buffers/memory.md -->

**Type:** Buffer ▼

[Buffer](https://docs.redpanda.com/connect/components/buffers/memory/)[Cache](https://docs.redpanda.com/connect/components/caches/memory/)

**Available in:** [Cloud](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/buffers/memory/%20%22View%20the%20Cloud%20version%20of%20this%20component%22), Self-Managed

Stores consumed messages in memory and acknowledges them at the input level. During shutdown Redpanda Connect will make a best attempt at flushing all remaining messages before exiting cleanly.

#### Common

```yml
buffers:
  memory:
    limit: 524288000
    batch_policy:
      enabled: false
      count: 0
      byte_size: 0
      period: ""
      check: ""
      processors: [] # No default (optional)
```

#### Advanced

```yml
buffers:
  memory:
    limit: 524288000
    batch_policy:
      enabled: false
      count: 0
      byte_size: 0
      period: ""
      check: ""
      processors: [] # No default (optional)
```

This buffer is appropriate when consuming messages from inputs that do not gracefully handle back pressure and where delivery guarantees aren’t critical.

This buffer has a configurable limit, where consumption will be stopped with back pressure upstream if the total size of messages in the buffer reaches this amount. Since this calculation is only an estimate, and the real size of messages in RAM is always higher, it is recommended to set the limit significantly below the amount of RAM available.

## [](#delivery-guarantees)Delivery guarantees

This buffer intentionally weakens the delivery guarantees of the pipeline and therefore should never be used in places where data loss is unacceptable.

## [](#batching)Batching

It is possible to batch up messages sent from this buffer using a [batch policy](https://docs.redpanda.com/connect/configuration/batching/#batch-policy).

## [](#fields)Fields

### [](#batch_policy)`batch_policy`

Optionally configure a policy to flush buffered messages in batches.

**Type**: `object`

### [](#batch_policy-byte_size)`batch_policy.byte_size`

An amount of bytes at which the batch should be flushed. If `0` disables size based batching.

**Type**: `int`

**Default**: `0`

### [](#batch_policy-check)`batch_policy.check`

A [Bloblang query](https://docs.redpanda.com/connect/guides/bloblang/about/) that should return a boolean value indicating whether a message should end a batch.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
check: this.type == "end_of_transaction"
```

### [](#batch_policy-count)`batch_policy.count`

A number of messages at which the batch should be flushed. If `0` disables count based batching.

**Type**: `int`

**Default**: `0`

### [](#batch_policy-enabled)`batch_policy.enabled`

Whether to batch messages as they are flushed.

**Type**: `bool`

**Default**: `false`

### [](#batch_policy-period)`batch_policy.period`

A period in which an incomplete batch should be flushed regardless of its size.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
period: 1s

# ---

period: 1m

# ---

period: 500ms
```

### [](#batch_policy-processors)`batch_policy.processors[]`

A list of [processors](https://docs.redpanda.com/connect/components/processors/about/) to apply to a batch as it is flushed. This allows you to aggregate and archive the batch however you see fit. Please note that all resulting messages are flushed as a single batch, therefore splitting the batch into smaller batches using these processors is a no-op.

**Type**: `processor`

```yaml
# Examples:
processors:
  - archive:
      format: concatenate

# ---

processors:
  - archive:
      format: lines

# ---

processors:
  - archive:
      format: json_array
```

### [](#limit)`limit`

The maximum buffer size (in bytes) to allow before applying backpressure upstream.

**Type**: `int`

**Default**: `524288000`