Status

Current stateAdopted (2.2.0)

Discussion thread: TBD

JIRA: KAFKA-7798

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Today Kafka Streams embedded a few lower-level producer, consumer, and admin clients inside itself:

This KIP proposes to expose these embedded client's ids via the ThreadMetadata. Those clientIds are useful in a number of ways:

Public Interfaces

public class ThreadMetadata {

    public String consumerClientId() {
        return mainConsumerClientId;
    }

    public String restoreConsumerClientId() {
        return restoreConsumerClientId;
    }

    // NOTE: without EOS it should be a singleton; otherwise it is one clientId per owned active task
    public Set<String> producerClientIds() {
        return producerClientIds;
    }

    public String adminClientId() {
        return adminClientId;
    }

    // ... other APIs
}



Proposed Changes

As above.

Compatibility, Deprecation, and Migration Plan

Rejected Alternatives