Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

生产者发送成功,kafka里却没有信息 #219

Open
jhomephper opened this issue Jun 14, 2018 · 3 comments
Open

生产者发送成功,kafka里却没有信息 #219

jhomephper opened this issue Jun 14, 2018 · 3 comments

Comments

@jhomephper
Copy link

Start sync metadata request
Start sync metadata request params:[]
Start Request ClientId: kafka-php ApiKey: MetadataRequest ApiVersion: 0
Send message start, params:{"required_ack":1,"timeout":5000,"data":{"test":{"partitions":[{"partition_id":0,"messages":["test....message."]}],"topic_name":"test"}}}
Start Request ClientId: kafka-php ApiKey: ProduceRequest ApiVersion: 2
Send message sucess, result: {"throttleTime":0,"data":[{"topicName":"test","partitions":[{"partition":0,"errorCode":0,"offset":22,"timestamp":-1}]}]}

@jhomephper
Copy link
Author

Start sync metadata request
Start sync metadata request params:[]
Start Request ClientId: kafka-php ApiKey: MetadataRequest ApiVersion: 0
Send message start, params:{"required_ack":1,"timeout":5000,"data":{"test":{"partitions":[{"partition_id":0,"messages":["test....message."]}],"topic_name":"test"}}}
Start Request ClientId: kafka-php ApiKey: ProduceRequest ApiVersion: 2
Send message sucess, result: {"throttleTime":0,"data":[{"topicName":"test","partitions":[{"partition":0,"errorCode":0,"offset":22,"timestamp":-1}]}]}
array(2) {
["throttleTime"]=>
int(0)
["data"]=>
array(1) {
[0]=>
array(2) {
["topicName"]=>
string(4) "test"
["partitions"]=>
array(1) {
[0]=>
array(4) {
["partition"]=>
int(0)
["errorCode"]=>
int(0)
["offset"]=>
int(22)
["timestamp"]=>
int(-1)
}
}
}
}
}

@zhangdang254
Copy link

解决了吗 兄弟

@burningice529
Copy link

作者在ConsumeConfig把maxBytes写死了65536。修改一下,或者继承一下,实现set方法即可。已提交修复等作者处理

/**
     * @var mixed[]
     */
    protected static $defaults = [
        'groupId'          => '',
        'sessionTimeout'   => 30000,
        'rebalanceTimeout' => 30000,
        'topics'           => [],
        'offsetReset'      => 'latest', // earliest
        'maxBytes'         => 65536, // 64kb
        'maxWaitTime'      => 100,
    ];

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants