File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010final class RouterProcessor implements Processor
1111{
12+ /**
13+ * compatibility with 0.8x
14+ */
15+ private const COMMAND_TOPIC_08X = '__command__ ' ;
16+
1217 /**
1318 * @var DriverInterface
1419 */
@@ -21,6 +26,17 @@ public function __construct(DriverInterface $driver)
2126
2227 public function process (InteropMessage $ message , Context $ context ): Result
2328 {
29+ // compatibility with 0.8x
30+ if (self ::COMMAND_TOPIC_08X === $ message ->getProperty (Config::TOPIC )) {
31+ $ clientMessage = $ this ->driver ->createClientMessage ($ message );
32+ $ clientMessage ->setProperty (Config::TOPIC , null );
33+
34+ $ this ->driver ->sendToProcessor ($ clientMessage );
35+
36+ return Result::ack ('Legacy 0.8x message routed to processor ' );
37+ }
38+ // compatibility with 0.8x
39+
2440 if ($ message ->getProperty (Config::COMMAND )) {
2541 return Result::reject (sprintf (
2642 'Unexpected command "%s" got. Command must not go to the router. ' ,
You can’t perform that action at this time.
0 commit comments