Skip to content

Commit 514d6dc

Browse files
committed
Merge branch 'fix/refactor-creation-of-connections-and-queues' into feature/support-octane-reconnect
2 parents adab85a + dd37cbf commit 514d6dc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class RabbitMQJob extends BaseJob
290290

291291
### Use your own Connection
292292

293-
You can extend the build-in `PhpAmqpLib\Connection\AMQPStreamConnection::class`
293+
You can extend the built-in `PhpAmqpLib\Connection\AMQPStreamConnection::class`
294294
or `PhpAmqpLib\Connection\AMQPSLLConnection::class` and within the connection config, you can define your own class.
295295
When you specify a `connection` key in the config, with your own class name, every connection will use your own class.
296296

@@ -355,7 +355,7 @@ You can alter the heartbeat settings by changing the config.
355355

356356
### SSL Secure
357357

358-
When u need a secure connection to rabbitMQ server(s). Then this is possible by setting extra config options.
358+
If you need a secure connection to rabbitMQ server(s), you will need to add these extra config options.
359359

360360
```php
361361
'connections' => [
@@ -421,8 +421,7 @@ If for some reason you don't want the connection lazy you can turn it off by set
421421

422422
## Laravel Usage
423423

424-
Once you completed the configuration you can use the Laravel Queue API. If you used other queue drivers you do not need
425-
to
424+
Once you completed the configuration you can use the Laravel Queue API. If you used other queue drivers you do not need to
426425
change anything else. If you do not know how to use the Queue API, please refer to the official Laravel
427426
documentation: http://laravel.com/docs/queues
428427

src/Consumer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ function (AMQPMessage $message) use ($connection, $options, $connectionName, $qu
125125
if ($this->supportsAsyncSignals()) {
126126
$this->resetTimeoutHandler();
127127
}
128+
129+
if ($options->rest > 0) {
130+
$this->sleep($options->rest);
131+
}
128132
},
129133
null,
130134
$arguments

0 commit comments

Comments
 (0)