kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Blower <cblo...@barracuda.com>
Subject Re: OffsetResponse: protocol size error
Date Mon, 15 Jul 2013 16:57:50 GMT
It looks like you may be parsing the result incorrectly. I would have
expected your data structure to look like:

If you are still having issues with this could you post the raw response
bytes?

{
    "topics": [
        {
            "partitionOffsets": [
                {
                    "partitionId": 0,
                    "errorCode": 0,
                    "offsets": [
                        0
                    ]
                }
            ],
            "topicName": "myTopic"
        }
    ],
    "responseSize": 31,
    "correlationId": 1979,
    "byteLength": 35
}



On 07/13/2013 06:52 PM, Vinicius Carvalho wrote:
> Hi there, when issuing offsetrequests with this payload:
>
> {
>     "requestMessage": {
>         "API_KEY": 2,
>         "replicaId": 0,
>         "topics": [
>             {
>                 "topicName": "myTopic",
>                 "partitions": [
>                     {
>                         "partitionId": 0,
>                         "time": 10000,
>                         "maxNumberofOffsets": 10
>                     }
>                 ]
>             }
>         ]
>     },
>     "correlationId": 1979,
>     "clientId": "foo"
> }
>
> I'm getting back:
>
> {
>     "topics": [
>         {
>             "partitionOffsets": [
>                 {
>                     "partitionId": 0,
>                     "errorCode": 0,
>                     "offset": 0
>                 }
>             ],
>             "topicName": "myTopic"
>         }
>     ],
>     "responseSize": 31,
>     "correlationId": 1979,
>     "byteLength": 35
> }
>
> It would be ok if not the fact that while reading the bytes from the
> server, when I get to the offset position, there's only 4 bytes left, not 8
> as expected. I've fixed this on my code by reading only an Int32 instead.
> Is this a bug?
>
> Regards
>
>


-- 
*Colin Blower*
/Software Engineer/
Barracuda Networks Inc.
+1 408-342-5576 (o)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message