[ 
https://issues.apache.org/jira/browse/KAFKA-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14201702#comment-14201702
 ] 

Honghai Chen commented on KAFKA-391:
------------------------------------

Many thanks for you help.
After debugging and testing, seemly I can't hit that exception.
Actually we're using one c# version client which is inherit from 
https://github.com/precog/kafka/tree/master/clients/csharp/src/Kafka/Kafka.Client
 , and after debug and compare it's code with java version, finally prove that 
it's the bug of the C# code.
In java version, when create ProducerRequest, it set produceRequest.data as 
messagesPerTopic,  and do group by topic just before send binary.
But in our c# version,  it group it first and set the produceRequest.data as 
dictionary of <Topic,Data>, so we hit this exception wrongly, we fixed it.

Many thanks for your time.
But anyway, can't find our related open source version from internet, our 
version has DefaultCallbackHandler.cs, but the version on 
https://github.com/precog/kafka/tree/master/clients/csharp/src/Kafka/Kafka.Client
 has no, so can't provide the link here.

The java link:
https://git-wip-us.apache.org/repos/asf?p=kafka.git;a=blob;f=core/src/main/scala/kafka/api/ProducerRequest.scala;h=570b2da1d865086f9830aa919a49063abbbe574d;hb=HEAD
https://git-wip-us.apache.org/repos/asf?p=kafka.git;a=blob;f=core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala;h=821901e4f434dfd9eec6eceabfc2e1e65507a57c;hb=HEAD#l260


> Producer request and response classes should use maps
> -----------------------------------------------------
>
>                 Key: KAFKA-391
>                 URL: https://issues.apache.org/jira/browse/KAFKA-391
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Joel Koshy
>            Assignee: Joel Koshy
>            Priority: Blocker
>              Labels: optimization
>             Fix For: 0.8.0
>
>         Attachments: KAFKA-391-draft-r1374069.patch, KAFKA-391-v2.patch, 
> KAFKA-391-v3.patch, KAFKA-391-v4.patch
>
>
> Producer response contains two arrays of error codes and offsets - the 
> ordering in these arrays correspond to the flattened ordering of the request 
> arrays.
> It would be better to switch to maps in the request and response as this 
> would make the code clearer and more efficient (right now, linear scans are 
> used in handling producer acks).
> We can probably do the same in the fetch request/response.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to