@@ -62,14 +62,14 @@ class RabbitMQQueue extends Queue implements QueueContract, RabbitMQQueueContrac
6262 /**
6363 * Holds the Configuration
6464 */
65- protected QueueConfig $ config ;
65+ protected QueueConfig $ rabbitMQConfig ;
6666
6767 /**
6868 * RabbitMQQueue constructor.
6969 */
7070 public function __construct (QueueConfig $ config )
7171 {
72- $ this ->config = $ config ;
72+ $ this ->rabbitMQConfig = $ config ;
7373 $ this ->dispatchAfterCommit = $ config ->isDispatchAfterCommit ();
7474 }
7575
@@ -293,7 +293,7 @@ public function setConnection(AbstractConnection $connection): RabbitMQQueue
293293 */
294294 public function getJobClass (): string
295295 {
296- $ job = $ this ->getConfig ()->getAbstractJob ();
296+ $ job = $ this ->getRabbitMQConfig ()->getAbstractJob ();
297297
298298 throw_if (
299299 ! is_a ($ job , RabbitMQJob::class, true ),
@@ -309,7 +309,7 @@ public function getJobClass(): string
309309 */
310310 public function getQueue ($ queue = null ): string
311311 {
312- return $ queue ?: $ this ->getConfig ()->getQueue ();
312+ return $ queue ?: $ this ->getRabbitMQConfig ()->getQueue ();
313313 }
314314
315315 /**
@@ -523,7 +523,7 @@ protected function createMessage($payload, int $attempts = 0): array
523523 $ properties ['correlation_id ' ] = $ correlationId ;
524524 }
525525
526- if ($ this ->getConfig ()->isPrioritizeDelayed ()) {
526+ if ($ this ->getRabbitMQConfig ()->isPrioritizeDelayed ()) {
527527 $ properties ['priority ' ] = $ attempts ;
528528 }
529529
@@ -605,16 +605,16 @@ protected function getQueueArguments(string $destination): array
605605 // Messages with a priority which is higher than the queue's maximum, are treated as if they were
606606 // published with the maximum priority.
607607 // Quorum queues does not support priority.
608- if ($ this ->getConfig ()->isPrioritizeDelayed () && ! $ this ->getConfig ()->isQuorum ()) {
609- $ arguments ['x-max-priority ' ] = $ this ->getConfig ()->getQueueMaxPriority ();
608+ if ($ this ->getRabbitMQConfig ()->isPrioritizeDelayed () && ! $ this ->getRabbitMQConfig ()->isQuorum ()) {
609+ $ arguments ['x-max-priority ' ] = $ this ->getRabbitMQConfig ()->getQueueMaxPriority ();
610610 }
611611
612- if ($ this ->getConfig ()->isRerouteFailed ()) {
612+ if ($ this ->getRabbitMQConfig ()->isRerouteFailed ()) {
613613 $ arguments ['x-dead-letter-exchange ' ] = $ this ->getFailedExchange ();
614614 $ arguments ['x-dead-letter-routing-key ' ] = $ this ->getFailedRoutingKey ($ destination );
615615 }
616616
617- if ($ this ->getConfig ()->isQuorum ()) {
617+ if ($ this ->getRabbitMQConfig ()->isQuorum ()) {
618618 $ arguments ['x-queue-type ' ] = 'quorum ' ;
619619 }
620620
@@ -639,7 +639,7 @@ protected function getDelayQueueArguments(string $destination, int $ttl): array
639639 */
640640 protected function getExchange (?string $ exchange = null ): string
641641 {
642- return $ exchange ?? $ this ->getConfig ()->getExchange ();
642+ return $ exchange ?? $ this ->getRabbitMQConfig ()->getExchange ();
643643 }
644644
645645 /**
@@ -648,15 +648,15 @@ protected function getExchange(?string $exchange = null): string
648648 */
649649 protected function getRoutingKey (string $ destination ): string
650650 {
651- return ltrim (sprintf ($ this ->getConfig ()->getExchangeRoutingKey (), $ destination ), '. ' );
651+ return ltrim (sprintf ($ this ->getRabbitMQConfig ()->getExchangeRoutingKey (), $ destination ), '. ' );
652652 }
653653
654654 /**
655655 * Get the exchangeType, or AMQPExchangeType::DIRECT as default.
656656 */
657657 protected function getExchangeType (?string $ type = null ): string
658658 {
659- $ constant = AMQPExchangeType::class.':: ' .Str::upper ($ type ?: $ this ->getConfig ()->getExchangeType ());
659+ $ constant = AMQPExchangeType::class.':: ' .Str::upper ($ type ?: $ this ->getRabbitMQConfig ()->getExchangeType ());
660660
661661 return defined ($ constant ) ? constant ($ constant ) : AMQPExchangeType::DIRECT ;
662662 }
@@ -666,7 +666,7 @@ protected function getExchangeType(?string $type = null): string
666666 */
667667 protected function getFailedExchange (?string $ exchange = null ): string
668668 {
669- return $ exchange ?? $ this ->getConfig ()->getFailedExchange ();
669+ return $ exchange ?? $ this ->getRabbitMQConfig ()->getFailedExchange ();
670670 }
671671
672672 /**
@@ -675,7 +675,7 @@ protected function getFailedExchange(?string $exchange = null): string
675675 */
676676 protected function getFailedRoutingKey (string $ destination ): string
677677 {
678- return ltrim (sprintf ($ this ->getConfig ()->getFailedRoutingKey (), $ destination ), '. ' );
678+ return ltrim (sprintf ($ this ->getRabbitMQConfig ()->getFailedRoutingKey (), $ destination ), '. ' );
679679 }
680680
681681 /**
@@ -735,9 +735,9 @@ protected function publishProperties($queue, array $options = []): array
735735 return [$ destination , $ exchange , $ exchangeType , $ attempts ];
736736 }
737737
738- protected function getConfig (): QueueConfig
738+ protected function getRabbitMQConfig (): QueueConfig
739739 {
740- return $ this ->config ;
740+ return $ this ->rabbitMQConfig ;
741741 }
742742
743743 /**
0 commit comments