# IResourceConfigEntry

**Kind:** Interface

**Source:** [`packages/microservices/external/kafka.interface.ts`](https://github.com/nestjs/nest/blob/master/packages/microservices/external/kafka.interface.ts#L376)

**Part of:** [Microservices](subsystem-packages-microservices)

`IResourceConfigEntry` represents a single Kafka resource configuration property as a name/value pair. It is used when defining or reading resource-level settings, such as topic, broker, or consumer configuration entries.

## Properties

| Property | Type |
|---|---|
| `name` | `string` |
| `value` | `string` |

## Diagram

```mermaid
graph LR
  Config[IResourceConfigEntry] --> Name[name: string]
  Config --> Value[value: string]
  Config --> Kafka[Kafka resource configuration]
```

## Usage

```ts
import type { IResourceConfigEntry } from './kafka.interface';

const topicConfig: IResourceConfigEntry = {
  name: 'retention.ms',
  value: '604800000',
};

// Example: include the entry in a Kafka topic configuration request
const resourceConfig: IResourceConfigEntry[] = [
  topicConfig,
  {
    name: 'cleanup.policy',
    value: 'delete',
  },
];
```

## AI Coding Instructions

- Use `name` for the exact Kafka configuration key, such as `retention.ms` or `cleanup.policy`.
- Store configuration values as strings, even when the underlying Kafka setting represents a number or boolean.
- Prefer typed `IResourceConfigEntry[]` collections when passing multiple resource settings to Kafka administration APIs.
- Do not add extra fields to configuration entries; consumers expect only `name` and `value`.
- Validate Kafka-specific configuration names and allowed values before submitting changes to a broker or topic.
