kl3sk / mqtt-transport-bundle
Provide a MQTT transport for symfony messenger
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- php-mqtt/client: ^1.8
- symfony/messenger: 6.3.*
- symfony/monolog-bundle: ^3.8
- symfony/options-resolver: 6.3.*
- symfony/serializer: 6.3.*
This package is auto-updated.
Last update: 2025-03-16 18:34:38 UTC
README
Note: This bundle is a work in progress
This bundle provide a MQTT transport for symfony messenger.
Installation
composer require kl3sk/mqtt-transport-bundle:@dev
Configuration
MESSENGER_MQTT_TRANSPORT_DSN=mqtt://user:password@broker:1883 MQTT_CLIENT_ID=symfonyclient MQTT_TOPICS='/topic1,/topic2'
Create your Message and Message handler Symfony documentation
services.yaml
services: framework: messenger: # ... your definitions transports: mqtt: dsn: '%env(MESSENGER_MQTT_TRANSPORT_DSN)%' serializer: Kl3sk\MqttTransportBundle\Serializer\JsonMessageSerializer routing: # Route your messages to the transports 'Kl3sk\MqttTransportBundle\Message\ExampleMessage': mqtt
Examples
See in the Mqtt
folder
Demo
You can find a demo here
Thanks
Thanks to Namoshek for his client and his help.