-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
- 你遇到了什么问题?
Acks设置为0时,会重复插入4条完全相同的数据
- Kafka 环境是自建还是云服务?
自建
- 请执行下面的命令获取环境信息。
php -v & php --ri swoole & composer info | grep longlang/phpkafka
PHP 7.4.16 (cli) (built: Mar 5 2021 07:54:20) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies
swoole
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 4.6.7
Built => Jun 1 2021 10:51:44
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.1.1g 21 Apr 2020
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
- 提供最小可复现代码:
https://github.com/longyan/phpkafka/blob/master/examples/producer.php
$config->setAcks(0); //修改成0即可 个人觉得 应该是 vendor/longlang/phpkafka/src/Producer/Producer.php 152行 continue; 的问题 ,应该改为 break;
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working