coka / semaphore-messenger
The Semaphore Transport allows you to send and receive messages on System V message queues.
Requires
- php: >=7.2
- ext-sysvmsg: *
- symfony/messenger: ^4.4
Requires (Dev)
- symfony/framework-bundle: ^4.4
- symfony/phpunit-bridge: ^4.4
- symfony/property-access: ^4.4
- symfony/serializer: ^4.4
This package is auto-updated.
Last update: 2024-11-09 23:01:07 UTC
README
The Semaphore Transport allows you to send and receive messages on System V message queues. The semaphore transport configuration looks like this :
# .env MESSENGER_TRANSPORT_DSN=semaphore://%kernel.project_dir%/.env # Full DSN Example MESSENGER_TRANSPORT_DSN=semaphore://%kernel.project_dir%/.env?project=M&message_type=1&message_max_size=1024
A number of options can be configured via the DSN or via the options key under the transport in messenger.yaml:
This extension is not available on Windows platforms.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require coka/semaphore-messenger
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Configuration
You can register the semaphore transport factory to be able to use it via a DSN in the Symfony application.
Register the Semaphore Transport Factory
# config/services.yaml services: Oka\Messenger\Transport\Semaphore\SemaphoreTransportFactory: tags: [messenger.transport_factory]
Use your Transport
Within the framework.messenger.transports.*
configuration, create your named transport using your own DSN:
# config/packages/messenger.yaml framework: messenger: transports: yours: 'semaphore://...'
Copyright and License
The coka/semaphore-messenger library is copyright © Baidai Cedrick Oka https://github.com/CedrickOka and licensed for use under the MIT License (MIT). Please see LICENSE for more information.