Skip to main content

client_instance_id

Function client_instance_id 

Source
pub async fn client_instance_id(
    telemetry: Option<&ClientTelemetry>,
    timeout: Time,
) -> Result<Option<Uuid>, ClientError>
Expand description

Kafka’s clientInstanceId of a producer, consumer or admin client (ClientTelemetryUtils.fetchClientInstanceId).

The broker-assigned client instance id, waiting up to timeout for the first subscription. Ok(None) when none has loaded by then, as Kafka returns null.

§Errors

Returns ClientError::InvalidArgument for a negative or non-finite timeout, and ClientError::TelemetryDisabled when the client does not push metrics (telemetry is None), as Kafka throws an IllegalArgumentException and an IllegalStateException.