Skip to content

Commit 0602ab2

Browse files
committed
AmqpTransport implements QueueReceiverInterface
1 parent 2d8f975 commit 0602ab2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Transport/AmqpTransport.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Messenger\Envelope;
1515
use Symfony\Component\Messenger\Transport\Receiver\MessageCountAwareInterface;
16+
use Symfony\Component\Messenger\Transport\Receiver\QueueReceiverInterface;
1617
use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer;
1718
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
1819
use Symfony\Component\Messenger\Transport\SetupableTransportInterface;
@@ -21,7 +22,7 @@
2122
/**
2223
* @author Nicolas Grekas <[email protected]>
2324
*/
24-
class AmqpTransport implements TransportInterface, SetupableTransportInterface, MessageCountAwareInterface
25+
class AmqpTransport implements QueueReceiverInterface, TransportInterface, SetupableTransportInterface, MessageCountAwareInterface
2526
{
2627
private $serializer;
2728
private $connection;
@@ -42,6 +43,14 @@ public function get(): iterable
4243
return ($this->receiver ?? $this->getReceiver())->get();
4344
}
4445

46+
/**
47+
* {@inheritdoc}
48+
*/
49+
public function getFromQueues(array $queueNames): iterable
50+
{
51+
return ($this->receiver ?? $this->getReceiver())->getFromQueues($queueNames);
52+
}
53+
4554
/**
4655
* {@inheritdoc}
4756
*/

0 commit comments

Comments
 (0)