Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> OffsetResponse: protocol size error


Copy link to this message
-
Re: OffsetResponse: protocol size error
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)

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB