Download the PHP package danielkorytek/messenger-bridge-bundle without Composer
On this page you can find all versions of the php package danielkorytek/messenger-bridge-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danielkorytek/messenger-bridge-bundle
More information about danielkorytek/messenger-bridge-bundle
Files in danielkorytek/messenger-bridge-bundle
Package messenger-bridge-bundle
Short Description Messenger bridge for Docplanner messaging standard
License proprietary
Informations about the package messenger-bridge-bundle
Middlewares
Routing key middleware
That middleware gives an ability to routing key modification ie: add current locale key to current message key.
RoutingKeyMiddleware
is implementing RoutingKeyResolverInterface
.
Configuration:
-
Register middleware
- Attach a middleware to messenger
In messenger.yml
put messenger.bridge.middleware.routing_key
to your bus middleware list.
Example:
Serialization
For serialize/deserialize messages package is using symfony/serializer
.
To endure adequate possibility for serialization/deserialization process, you need enable normalizers and denormalizers.
Required serializer configuration:
Bus example configuration
Messages
All messages representation classes HAVE TO
implement NamedMessageInterface
. Every message handled by bus, without implementing NamedMessageInterface
will throws UnsupportedMessage
exception.
Publishing
- Check if your bus has
allow_no_handlers
middleware (it's required). Your bus will publish message to transport only when you don't have any subscriber class for that message. - Add your message FQCN to messenger routing configuration with correct transport name:
Subscribing
-
Register serializer for external messages
-
Add message binding key in your incoming transport: This step is for messenger command. If you're using different package, you should update config in proper place.
- Create representation class for a message.
-
Attach message mapping to
messenger.bridge.subscriber_events_mapping
parameter: - Create subscriber class and bind with correct bus:
All versions of messenger-bridge-bundle with dependencies
symfony/messenger Version ^4.4 || ^5.0 || ^6.0
symfony/http-kernel Version *
symfony/dependency-injection Version *
symfony/serializer Version *