8000 :sparkles: [53543] Introduce reset Redis messenger connection · symfony/symfony@433dad7 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 433dad7

Browse files
committed
✨ [53543] Introduce reset Redis messenger connection
1 parent 63e87bd commit 433dad7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisTransport.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
1919
use Symfony\Component\Messenger\Transport\SetupableTransportInterface;
2020
use Symfony\Component\Messenger\Transport\TransportInterface;
21+
use Symfony\Contracts\Service\ResetInterface;
2122

2223
/**
2324
* @author Alexander Schranz <alexander@sulu.io>
2425
* @author Antoine Bluchet <soyuka@gmail.com>
2526
*/
26-
class RedisTransport implements TransportInterface, KeepaliveReceiverInterface, SetupableTransportInterface, MessageCountAwareInterface
27+
class RedisTransport implements TransportInterface, KeepaliveReceiverInterface, SetupableTransportInterface, MessageCountAwareInterface, ResetInterface
2728
{
2829
private SerializerInterface $serializer;
2930
private RedisReceiver $receiver;
@@ -80,4 +81,9 @@ private function getSender(): RedisSender
8081
{
8182
return $this->sender ??= new RedisSender($this->connection, $this->serializer);
8283
}
84+
85+
public function reset(): void
86+
{
87+
$this->connection->reset();
88+
}
8389
}

0 commit comments

Comments
 (0)
0