kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Ozeritskiy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-1644) Inherit FetchResponse from RequestOrResponse
Date Fri, 03 Oct 2014 15:49:37 GMT

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

Alexey Ozeritskiy commented on KAFKA-1644:
------------------------------------------

This patch simplifies writing clients. Now we have to use the following ugly code:
{code:java}
            if (id == ResponseKeys.FetchKey) {
              val response = FetchResponse.readFrom(contentBuffer)
              listener ! FetchAnswer(response)
            } else {
              val response = ResponseKeys.deserializerForKey(id)(contentBuffer)
              listener ! Answer(response)
            }
{code}

> Inherit FetchResponse from RequestOrResponse
> --------------------------------------------
>
>                 Key: KAFKA-1644
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1644
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Anton Karamanov
>            Assignee: Anton Karamanov
>         Attachments: 0001-KAFKA-1644-Inherit-FetchResponse-from-RequestOrRespo.patch
>
>
> Unlike all other Kafka API responses {{FetchResponse}} is not a subclass of RequestOrResponse,
which requires handling it as a special case while processing responses.



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

Mime
View raw message