diff --git a/examples/01.basic.php b/examples/01.basic.php index 0d32143..2745cc0 100644 --- a/examples/01.basic.php +++ b/examples/01.basic.php @@ -25,8 +25,8 @@ ->setMessageHandler(function (QueueMessage $message, Worker $worker) { // 模拟正常处理逻辑 usleep(1000); - }) - ->registerSignal(SIGINT, function () { + }) + ->registerSignal(SIGINT, function () { // Ctrl+C会向前端进程组发送SIGINT信号,我们不希望worker也被这个信号影响,而是希望由dispatcher来控制它的生存周期 }) ->registerEvent('error', function (string $reason, \Throwable $e, Worker $worker) { diff --git a/examples/04.prefetch.php b/examples/04.prefetch.php index a82d88d..48b5bbe 100644 --- a/examples/04.prefetch.php +++ b/examples/04.prefetch.php @@ -33,7 +33,7 @@ $params = require __DIR__.'/amqp_params.php'; $conn = new Connection($params['connectionOptions'], $params['queues']); -// !!!!!!!!!!就是这里!!!!!!!!!!!! +// 使用该方法设置prefetch值 $conn->setPrefetch(10); $dispatcher = (new Dispatcher($conn, $factory))