File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
final class RouterProcessor implements Processor
11
11
{
12
+ /**
13
+ * compatibility with 0.8x
14
+ */
15
+ private const COMMAND_TOPIC_08X = '__command__ ' ;
16
+
12
17
/**
13
18
* @var DriverInterface
14
19
*/
@@ -21,6 +26,17 @@ public function __construct(DriverInterface $driver)
21
26
22
27
public function process (InteropMessage $ message , Context $ context ): Result
23
28
{
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
+
24
40
if ($ message ->getProperty (Config::COMMAND )) {
25
41
return Result::reject (sprintf (
26
42
'Unexpected command "%s" got. Command must not go to the router. ' ,
You can’t perform that action at this time.
0 commit comments