File tree Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -630,7 +630,17 @@ protected function parseTimeoutMessages(int $count = 100)
630630 */
631631 public function getMessageKeyPrefix (): string
632632 {
633- return $ this ->prefix . $ this ->name . ':message: ' ;
633+ $ redis = RedisManager::getInstance ($ this ->poolName );
634+ if ($ redis ->isCluster ())
635+ {
636+ $ name = '{ ' . $ this ->name . '} ' ;
637+ }
638+ else
639+ {
640+ $ name = $ this ->name ;
641+ }
642+
643+ return $ this ->prefix . $ name . ':message: ' ;
634644 }
635645
636646 /**
@@ -640,7 +650,17 @@ public function getMessageKeyPrefix(): string
640650 */
641651 public function getMessageIdKey (): string
642652 {
643- return $ this ->prefix . $ this ->name . ':message:id ' ;
653+ $ redis = RedisManager::getInstance ($ this ->poolName );
654+ if ($ redis ->isCluster ())
655+ {
656+ $ name = '{ ' . $ this ->name . '} ' ;
657+ }
658+ else
659+ {
660+ $ name = $ this ->name ;
661+ }
662+
663+ return $ this ->prefix . $ name . ':message:id ' ;
644664 }
645665
646666 /**
@@ -652,6 +672,16 @@ public function getMessageIdKey(): string
652672 */
653673 public function getQueueKey (int $ queueType ): string
654674 {
655- return $ this ->prefix . $ this ->name . ': ' . strtolower (QueueType::getName ($ queueType ));
675+ $ redis = RedisManager::getInstance ($ this ->poolName );
676+ if ($ redis ->isCluster ())
677+ {
678+ $ name = '{ ' . $ this ->name . '} ' ;
679+ }
680+ else
681+ {
682+ $ name = $ this ->name ;
683+ }
684+
685+ return $ this ->prefix . $ name . ': ' . strtolower (QueueType::getName ($ queueType ));
656686 }
657687}
You can’t perform that action at this time.
0 commit comments