Skip to content

DeleteAclResponse

reference
1 min readUpdated

Kind: Interface

Source: packages/microservices/external/kafka.interface.ts

Part of: Microservices

DeleteAclResponse represents the Kafka broker response returned after a delete-ACL request. It includes the broker-applied throttle duration and a result entry for each ACL filter submitted in the request.

Properties

PropertyType
throttleTimenumber
filterResponsesDeleteAclFilterResponses[]

Diagram

mermaid
graph LR
  Client[Kafka Client] --> Request[Delete ACL Request]
  Request --> Broker[Kafka Broker]
  Broker --> Response[DeleteAclResponse]
  Response --> Throttle[throttleTime: number]
  Response --> Filters[filterResponses: DeleteAclFilterResponses[]]
  Filters --> FilterResult[Per-filter deletion results]

Usage

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

function handleDeleteAclResponse(response: DeleteAclResponse): void {
  console.log(`Broker throttle time: ${response.throttleTime}ms`);

  for (const filterResponse of response.filterResponses) {
    console.log('Processed ACL deletion filter:', filterResponse);
  }
}

// Example response returned by a Kafka ACL deletion operation
const response: DeleteAclResponse = await kafkaAdmin.deleteAcls({
  filters: [
    {
      resourceType: 2,
      resourceName: 'orders',
      patternType: 3,
    },
  ],
});

handleDeleteAclResponse(response);

AI Coding Instructions

  • Treat filterResponses as a per-filter result list; preserve its ordering when correlating results with the original delete-ACL filters.
  • Use throttleTime to respect Kafka broker rate limiting before issuing subsequent administrative requests.
  • Inspect each DeleteAclFilterResponses entry for filter-specific errors rather than assuming the overall request succeeded.
  • Keep this interface aligned with the Kafka Delete ACLs protocol response schema when upgrading Kafka client or protocol support.

How it works

DeleteAclResponse is an exported TypeScript interface in a file intended to represent KafkaJS package types rather than NestJS logic. packages/microservices/external/kafka.interface.ts:1-8 It describes the resolved value of Admin.deleteAcls, whose argument is an object containing a required filters: AclFilter[] property. packages/microservices/external/kafka.interface.ts:497-500 packages/microservices/external/kafka.interface.ts:502-560

The deletion filters require resourceType, resourcePatternType, operation, and permissionType; resourceName, principal, and host are optional. packages/microservices/external/kafka.interface.ts:469-477

This interface contains no runtime implementation, validation, thrown-error declaration, or side-effect logic; it only declares the response shape. packages/microservices/external/kafka.interface.ts:1-8 packages/microservices/external/kafka.interface.ts:497-500

Was this page helpful?

Download as PDF
DeleteAclResponse — NestJS head-to-head