You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jay Kreps (JIRA)" <ji...@apache.org> on 2013/11/21 05:41:36 UTC

[jira] [Commented] (KAFKA-1137) Problem of FetchRequest API

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

Jay Kreps commented on KAFKA-1137:
----------------------------------

One thing to be aware of is that we process requests from a connection sequentially and allow only a single in-flight request per connection to ensure ordering. I can't tell from your description if this is the issue.

Specifically say that t1 has no messages ready but t2 has one message ready. Let's say you issue
Fetch(topic = t1, minBytes = 1, maxWait = 30)
Fetch(topic = t2, minBytes = 1, maxWait = 30)
The expected behavior is that the requests will be answered in the order issued so the first request will block for 30 seconds and then respond with no messages and then the second request will immediately respond with the ready message. Is that what you see, it kind of sounds like you are saying the opposite...


> Problem of FetchRequest API
> ---------------------------
>
>                 Key: KAFKA-1137
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1137
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 0.8
>            Reporter: aio
>            Assignee: Neha Narkhede
>
> We meet this problem when use Fetch API [0] in Node.js client [1]. The detail of the problem as follow:
> Send 2 FetchRequest in sequence through one long polling socket connection, each request hold one different topic (topic1 and topic2), topic2 is sent after topic1,MaxWaitTime set 30s, MinBytes set 1 byte. As the protocol doc said, when topic has new produced message, Kafka server would write back response to the socket, but the fact is Kafka server write response only when the last topic (topic2) has new message, otherwise we have to wait 30s to get the fetchResponse of topic1.
> I think Kafka server only approve the the MaxWaitTime in last FetchRequest of one socket connection, but why respond the new message in all topic when the last request have message.
> [0] : https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-FetchRequest
> [1] : https://github.com/SOHU-Co/kafka-node



--
This message was sent by Atlassian JIRA
(v6.1#6144)