Skip to content

[Studio] feat: Proxy Admin Client Service and Data Models #10636

Description

@zhaohai666

[studio] feat: Proxy Admin Client Service and Data Models

Background

This is the fifth atomic PR in the RIP-2 (Proxy Admin Interface) series. It implements the client management service that provides visibility into connected gRPC clients, along with the data models for diagnostics and receipt handle tracking.

Design Proposal

Client Service

  • ProxyAdminClientService (interface): Defines the contract for admin client queries:

    • listClients(filter) — List connected clients with pagination and filtering
    • getClientDetail(clientId) — Get full diagnostics for a specific client
    • getConsumeDiagnostics(group) — Get consumer group health metrics
    • getReceiptHandleInfo(group, topic) — Query receipt handle status
  • DefaultProxyAdminClientService (implementation): Aggregates data from GrpcChannelManager, ClientActivity, and ReceiptHandleProcessor to build comprehensive client views

Data Models

  • ClientDetailInfo: Full client profile — connection time, last activity, subscribed topics, consumption mode, channel state, pending requests
  • ClientInstanceInfo: Lightweight client summary for list views — ID, address, version, status
  • ListClientsFilter: Query parameters — topic filter, group filter, address pattern, pagination offset/limit

Diagnostics Models

  • BatchConsumeClientDiagnostics: Batch-mode consumer health — pull latency, batch size distribution, lag estimate
  • BatchConsumeGroupSummary: Group-level aggregation — total consumers, cumulative lag, throughput
  • PopReceiptHandleGroupSummary: Pop-mode receipt handle statistics — active handles, expired count, renewal rate
  • PopReceiptHandleInfo: Individual handle detail — handle ID, topic, queue, acquire time, TTL, renewal count

Scope

File Type Description
ProxyAdminClientService.java New Service interface
DefaultProxyAdminClientService.java New Service implementation
ClientDetailInfo.java New Client detail model
ClientInstanceInfo.java New Client summary model
ListClientsFilter.java New Query filter model
BatchConsumeClientDiagnostics.java New Batch consumer diagnostics
BatchConsumeGroupSummary.java New Group summary model
PopReceiptHandleGroupSummary.java New Pop handle statistics
PopReceiptHandleInfo.java New Handle detail model
DefaultProxyAdminClientServiceTest.java New Integration tests (934 lines)
DefaultProxyAdminClientServiceUnitTest.java New Unit tests (405 lines)

Total: 11 files, +3169 lines

Dependencies

Testing

  • Unit tests with mocked channel manager and client activity
  • Integration tests verifying end-to-end data aggregation
  • Filter tests: pagination, topic/group filtering, address pattern matching
  • Edge cases: no clients connected, client disconnects during query

Branch

feature/rip-2-pr5-admin-client-service

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions