pnz / messenger-filesystem-transport-bundle
Symfony Bundle for the filesystem messenger transport.
Installs: 716
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
Open Issues: 1
Type:symfony-bundle
Requires
- pnz/messenger-filesystem-transport: 0.2.x-dev
- symfony/config: ^4.1
- symfony/dependency-injection: ^4.1
- symfony/http-kernel: ^4.1
Requires (Dev)
- phpunit/phpunit: ^7.2
This package is auto-updated.
Last update: 2020-01-16 11:47:38 UTC
README
Integrates the Filesystem Transport to Symfony.
Install
composer require pnz/messenger-filesystem-transport-bundle
This transport handles the filesystem://
schema, use the FilesystemTransportFactory
to create the transport.
Symfony configuration:
Configure the Filesystem transport:
# config/packages/messenger.yaml parameters: # Default ENV value: the queue messages will be stored in the `var/queue` folder, # The trailing `//` is required for match the `filesystem://` schema env(MESSENGER_TRANSPORT_DSN): "filesystem://%kernel.project_dir%/var/queue" framework: messenger: transports: filesystem: '%env(resolve:MESSENGER_TRANSPORT_DSN)%' routing: App\Message\MyMessage: filesystem
Configuration
Check the Filesystem Transport documentation.
In short, the DSN includes the following query parameters:
compress
: Enable/Disable compression of messages storage (gzinflate/gzdeflate), usecompress=true
(default: false)loop_sleep
: Define the sleep interval between loops in micro-seconds, useloop_sleep=MICRO-SECONDS
(default: 500000)
Example:
# .env # Enable compression, and sleep for 0.8 seconds during loops if the queue is empty MESSENGER_TRANSPORT_DSN="filesystem://%kernel.project_dir%/var/queue/default?compress=true&loop_sleep=800000"