@@ -47,10 +47,10 @@ public function __construct(
4747
4848 public function sendToRouter (Message $ message ): void
4949 {
50- if ($ message ->getProperty (Config::PARAMETER_COMMAND_NAME )) {
50+ if ($ message ->getProperty (Config::COMMAND_PARAMETER )) {
5151 throw new \LogicException ('Command must not be send to router but go directly to its processor. ' );
5252 }
53- if (false == $ message ->getProperty (Config::PARAMETER_TOPIC_NAME )) {
53+ if (false == $ message ->getProperty (Config::TOPIC_PARAMETER )) {
5454 throw new \LogicException ('Topic name parameter is required but is not set ' );
5555 }
5656
@@ -63,21 +63,21 @@ public function sendToRouter(Message $message): void
6363
6464 public function sendToProcessor (Message $ message ): void
6565 {
66- $ topic = $ message ->getProperty (Config::PARAMETER_TOPIC_NAME );
67- $ command = $ message ->getProperty (Config::PARAMETER_COMMAND_NAME );
66+ $ topic = $ message ->getProperty (Config::TOPIC_PARAMETER );
67+ $ command = $ message ->getProperty (Config::COMMAND_PARAMETER );
6868
6969 /** @var InteropQueue $queue */
7070 $ queue = null ;
71- if ($ topic && $ processor = $ message ->getProperty (Config::PARAMETER_PROCESSOR_NAME )) {
71+ if ($ topic && $ processor = $ message ->getProperty (Config::PROCESSOR_PARAMETER )) {
7272 $ route = $ this ->routeCollection ->topicAndProcessor ($ topic , $ processor );
7373 if (false == $ route ) {
7474 throw new \LogicException (sprintf ('There is no route for topic "%s" and processor "%s" ' , $ topic , $ processor ));
7575 }
7676
77- $ message ->setProperty (Config::PARAMETER_PROCESSOR_NAME , $ route ->getProcessor ());
77+ $ message ->setProperty (Config::PROCESSOR_PARAMETER , $ route ->getProcessor ());
7878 $ queue = $ this ->createRouteQueue ($ route );
79- } elseif ($ topic && false == $ message ->getProperty (Config::PARAMETER_PROCESSOR_NAME )) {
80- $ message ->setProperty (Config::PARAMETER_PROCESSOR_NAME , $ this ->config ->getRouterProcessorName ());
79+ } elseif ($ topic && false == $ message ->getProperty (Config::PROCESSOR_PARAMETER )) {
80+ $ message ->setProperty (Config::PROCESSOR_PARAMETER , $ this ->config ->getRouterProcessorName ());
8181
8282 $ queue = $ this ->createQueue ($ this ->config ->getRouterQueueName ());
8383 } elseif ($ command ) {
@@ -86,7 +86,7 @@ public function sendToProcessor(Message $message): void
8686 throw new \LogicException (sprintf ('There is no route for command "%s". ' , $ command ));
8787 }
8888
89- $ message ->setProperty (Config::PARAMETER_PROCESSOR_NAME , $ route ->getProcessor ());
89+ $ message ->setProperty (Config::PROCESSOR_PARAMETER , $ route ->getProcessor ());
9090 $ queue = $ this ->createRouteQueue ($ route );
9191 } else {
9292 throw new \LogicException ('Either topic or command parameter must be set. ' );
0 commit comments