Skip to content

Commit e4aee07

Browse files
authored
Merge pull request #117 from php-enqueue/amqp-add-sleep-to-basic-get
[amqp] Fixes high CPU consumption when basic get is used
2 parents c877d51 + 522d257 commit e4aee07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/amqp-ext/AmqpConsumer.php

+2
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ private function receiveBasicGet($timeout)
134134
if ($message = $this->receiveNoWait()) {
135135
return $message;
136136
}
137+
138+
usleep(100000); //100ms
137139
}
138140
}
139141

0 commit comments

Comments
 (0)