Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Closed
Description
Description
It would be very useful to have a routing key in custom messenger incoming data. Currently, there is no way to map message to type on the base on routing key
Example
class CustomSerializerimplements SerializerInterface{publicfunctiondecode(array$encodedEnvelope):Envelope {$body =$encodedEnvelope['body'];$headers =$encodedEnvelope['headers'];$extra =$encodedEnvelope['extra'];$routingKey =$extra->routingKey;switch($routingKey) {case'blah':$message =newType1($body)... } ..... }}