GitHub user kawamuray reopened a pull request:

    https://github.com/apache/kafka/pull/1555

    MINOR: Fix ambiguous log message in RecordCollector

    When producing fails in Kafka Streams, it gives an error like below:
    
    ```
    Error sending record: null
    ```
    
    by this line: 
https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java#L59
    
    This isn't not making sense because of:
    - Practically metadata is always null when exception != null : 
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java#L107-L109
    - It's quite misleading as we would interpret it like "Kafka Streams 
attempted to send 'null' as a record" which isn't in fact
    
    As I find a PR #873  as the origin of the above line I changed it to 
instantiate callback on each send in order to log destination topic at least.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kawamuray/kafka 
MINOR-record-collector-log-message

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/1555.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1555
    
----
commit 753d0836e586f283bbbe54b354695c7fdbca6ef7
Author: Yuto Kawamura <kawamuray.dad...@gmail.com>
Date:   2016-06-26T07:32:08Z

    MINOR: Fix ambiguous log message in RecordCollector
    
    To avoid "Error sending record: null".
    - Practically metadata is always null when exception != null
    - With repsect to #873, create callback instance on each send to log
      destination topic

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to