Kafka Create Partitions API (admin/create-partitions-v3.ts)

kafka · src/apis/admin/create-partitions-v3.ts · typescript · Apache-2.0
integration, infra, realtime, lang:typescript, tag:protocol

Defines request and response protocols for the Kafka CreatePartitions v3 API. Reuse when building Kafka client tools or administrative broker features.

// Source: https://github.com/platformatic/kafka | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { ResponseError } from '../../errors.ts'
import { type Nullable, type NullableString } from '../../protocol/definitions.ts'
import { type Reader } from '../../protocol/reader.ts'
import { Writer } from '../../protocol/writer.ts'
import { createAPI, type ResponseErrorWithLocation } from '../definitions.ts'

export interface CreatePartitionsRequestAssignment {
  brokerIds: number[]
}

export interface CreatePartitionsRequestTopic {
  name: string
  count: number
  assignments?: Nullable<CreatePartitionsRequestAssignment[]>
}

export type CreatePartitionsRequest = Parameters<typeof

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key