diff --git a/pkg/enqueue/Client/Config.php b/pkg/enqueue/Client/Config.php index 66fc07596..c0685ca1f 100644 --- a/pkg/enqueue/Client/Config.php +++ b/pkg/enqueue/Client/Config.php @@ -103,7 +103,7 @@ public function getRouterProcessorName() */ public function createTransportRouterTopicName($name) { - return trim(strtolower(trim($this->prefix).'.'.trim($name)), '.'); + return $this->getQueueName($name); } /** @@ -113,7 +113,7 @@ public function createTransportRouterTopicName($name) */ public function createTransportQueueName($name) { - return trim(strtolower(trim($this->prefix).'.'.trim($this->appName).'.'.trim($name)), '.'); + return $this->getQueueName($name); } /** @@ -154,4 +154,14 @@ public static function create( $routerProcessorName ?: 'router' ); } + + /** + * @param string $name + * + * @return string + */ + private function getQueueName($name) + { + return trim(strtolower(trim($this->prefix).'.'.trim($this->appName).'.'.trim($name)), '.'); + } } diff --git a/pkg/enqueue/Tests/Client/ConfigTest.php b/pkg/enqueue/Tests/Client/ConfigTest.php index 7d2c0a499..14630369f 100644 --- a/pkg/enqueue/Tests/Client/ConfigTest.php +++ b/pkg/enqueue/Tests/Client/ConfigTest.php @@ -73,7 +73,7 @@ public function testShouldCreateRouterTopicName() 'aRouterProcessorName' ); - $this->assertEquals('aprefix.aname', $config->createTransportRouterTopicName('aName')); + $this->assertEquals('aprefix.aapp.aname', $config->createTransportRouterTopicName('aName')); } public function testShouldCreateProcessorQueueName() diff --git a/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php b/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php index 387ddf896..36b2c942f 100644 --- a/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php +++ b/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php @@ -528,7 +528,7 @@ public function testShouldSetupBroker() $logger ->expects($this->at(0)) ->method('debug') - ->with('[RabbitMqStompDriver] Declare router exchange: prefix.routertopic') + ->with('[RabbitMqStompDriver] Declare router exchange: prefix.app.routertopic') ; $logger ->expects($this->at(1))