1
0
mirror of synced 2024-11-21 20:46:07 +03:00

fix decoding headers by PhpSerializer, update README

This commit is contained in:
Akolzin Dmitry 2021-02-05 16:21:54 +03:00
parent 699e1f72d6
commit e2cab9c135
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);