# ConfigSynonyms

**Kind:** Interface

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

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

`ConfigSynonyms` represents a Kafka broker configuration entry together with its resolved value and origin. It is used when inspecting or describing Kafka configuration synonyms, allowing consumers to identify both the effective setting and the `ConfigSource` that supplied it.

## Properties

| Property | Type |
|---|---|
| `configName` | `string` |
| `configValue` | `string` |
| `configSource` | `ConfigSource` |

## Diagram

```mermaid
graph LR
  A[Kafka Configuration Response] --> B[ConfigSynonyms]
  B --> C[configName: string]
  B --> D[configValue: string]
  B --> E[configSource: ConfigSource]
  E --> F[Kafka Config Origin]
```

## Usage

```ts
import { ConfigSource, type ConfigSynonyms } from './kafka.interface';

const brokerConfig: ConfigSynonyms = {
  configName: 'log.retention.hours',
  configValue: '168',
  configSource: ConfigSource.DEFAULT_CONFIG,
};

function describeConfig(config: ConfigSynonyms): string {
  return `${config.configName}=${config.configValue} (${config.configSource})`;
}

console.log(describeConfig(brokerConfig));
```

## AI Coding Instructions

- Preserve `configName` and `configValue` as strings, even when the configuration value represents a number or boolean.
- Always provide a valid `ConfigSource` enum value to identify where Kafka resolved the setting from.
- Use this interface when mapping Kafka Admin API configuration synonym responses into application-level types.
- Do not assume `configValue` is parsed or normalized; convert it explicitly before performing numeric or boolean operations.
