class KarelDbCoordinator extends AbstractCoordinator implements Closeable {

    @Override
    public JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() {
        ByteBuffer metadata = KarelDbProtocol.serializeMetadata(identity);
        return new JoinGroupRequestData.JoinGroupRequestProtocolCollection(
            Collections.singletonList(new JoinGroupRequestData.JoinGroupRequestProtocol()
                .setName(KDB_SUBPROTOCOL_V0)
                .setMetadata(metadata.array())).iterator());
    }

    public  KarelDbCoordinator(
        LogContext logContext,
        ConsumerNetworkClient client,
        String groupId,
        int rebalanceTimeoutMs,
        int sessionTimeoutMs,
        int heartbeatIntervalMs,
        Metrics metrics,
        String metricGrpPrefix,
        Time time,
        long retryBackoffMs,
        KarelDbIdentity identity,
        KarelDbRebalanceListener listener);

}