You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Kirk True (Jira)" <ji...@apache.org> on 2021/07/01 18:46:00 UTC
[jira] [Assigned] (KAFKA-12841) NPE from the provided metadata in
client callback in case of ApiException
[ https://issues.apache.org/jira/browse/KAFKA-12841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirk True reassigned KAFKA-12841:
---------------------------------
Assignee: Kirk True
> NPE from the provided metadata in client callback in case of ApiException
> -------------------------------------------------------------------------
>
> Key: KAFKA-12841
> URL: https://issues.apache.org/jira/browse/KAFKA-12841
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Affects Versions: 2.6.0
> Environment: Prod
> Reporter: Avi Youkhananov
> Assignee: Kirk True
> Priority: Major
> Attachments: NPE.production
>
>
> 1.
> org.apache.kafka.clients.producer.Callback interface has method onCompletion(...)
> Which says as part of the documentation :
> *The metadata for the record that was sent (i.e. the partition and offset). *An empty metadata with -1 value for all fields* except for topicPartition will be returned if an error occurred.
> We got an NPE from doSend(...) method in org.apache.kafka.clients.producer.KafkaProducer
> Which can occur in case ApiException was thrown ...
> In case of ApiException it uses the regular callback instead of InterceptorCallback which also may cover the NPE.
> 2. More over RecordMetadata has method partition() which return int but can also throw NPE because TopicPartition might be null.
> Stack trace attached.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)