Skip to content

Commit b7a22cd

Browse files
committed
[client] Fix Exclusive Command Extension ignores route queue preifx option.
1 parent 14ab754 commit b7a22cd

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎pkg/enqueue/Client/ConsumptionExtension/ExclusiveCommandExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private function buildMap(): array
6464
continue;
6565
}
6666

67-
$queueName = $this->driver->createQueue($route->getQueue())->getQueueName();
67+
$queueName = $this->driver->createRouteQueue($route)->getQueueName();
6868
if (array_key_exists($queueName, $map)) {
6969
throw new \LogicException('The queue name has been already bound by another exclusive command processor');
7070
}

‎pkg/enqueue/Tests/Client/ConsumptionExtension/ExclusiveCommandExtensionTest.php‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,10 @@ public function testShouldSetCommandPropertiesIfCurrentQueueHasExclusiveCommandP
181181
$driver = $this->createDriverStub($routeCollection);
182182
$driver
183183
->expects($this->any())
184-
->method('createQueue')
185-
->willReturnCallback(function (string $queueName) {
186-
return new NullQueue($queueName);
184+
->method('createRouteQueue')
185+
->with($this->isInstanceOf(Route::class))
186+
->willReturnCallback(function (Route $route) {
187+
return new NullQueue($route->getQueue());
187188
})
188189
;
189190

0 commit comments

Comments
 (0)