1
0
mirror of synced 2024-11-24 05:56:07 +03:00

Fix decoding headers by PhpSerializer, update README

This commit is contained in:
Alex Lushpai 2021-02-05 17:29:31 +03:00 committed by GitHub
commit f812aeaf12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -32,9 +32,18 @@ framework:
'App\Message\MyMessage': async
```
* add transport factory in `config/services.yml`
```yaml
services:
# ...
RetailCrm\Messenger\Beanstalkd\Transport\BeanstalkTransportFactory:
tags: [messenger.transport_factory]
```
## Allowed transport options
* `queue_name` - tube name in beanstalkd
* `tube_name` - tube name in beanstalkd
* `timeout` - timeout for receiving jobs from tube. Default - 0
@ -42,4 +51,4 @@ framework:
* `not_send_if_exists` - do not send a job to the queue only if such a job is already exist. Default - `true`
All options are optional, if `queue_name` not specified will be used default queue `default`
All options are optional, if `tube_name` not specified will be used default queue `default`

View File

@ -48,7 +48,7 @@ class BeanstalkSender implements SenderInterface
$delay = $delayStamp->getDelay();
}
$message = $this->connection->serializeJob($encodedMessage['body'], $encodedMessage['headers']);
$message = $this->connection->serializeJob($encodedMessage['body'], $encodedMessage['headers'] ?? []);
if ($this->connection->isNotSendIfExists()) {
$this->sendIfNotExist($message, $delay);