original_string: private function createDelayQueue(int $delay, ?string $routingKey)
      {
          $queue = $this->amqpFactory->createQueue($this->channel());
          $queue->setName(str_replace('%delay%', $delay, $this->connectionOptions['delay']['queue_name_pattern']));
          $queue->setArguments([
              'x-message-ttl' => $delay,
              'x-dead-letter-exchange' => $this->exchange()->getName(),
          ]);
  
          $routingKey = $routingKey ?? $this->getDefaultPublishRoutingKey();
          if (null !== $routingKey) {
              // after being released from to DLX, this routing key will be used
              $queue->setArgument('x-dead-letter-routing-key', $routingKey);
          }
  
          return $queue;
      }
code: private function createDelayQueue(int $delay, ?string $routingKey)
      {
          $queue = $this->amqpFactory->createQueue($this->channel());
          $queue->setName(str_replace('%delay%', $delay, $this->connectionOptions['delay']['queue_name_pattern']));
          $queue->setArguments([
              'x-message-ttl' => $delay,
              'x-dead-letter-exchange' => $this->exchange()->getName(),
          ]);
  
          $routingKey = $routingKey ?? $this->getDefaultPublishRoutingKey();
          if (null !== $routingKey) {
              // after being released from to DLX, this routing key will be used
              $queue->setArgument('x-dead-letter-routing-key', $routingKey);
          }
  
          return $queue;
      }
code_tokens: private function createDelayQueue ( int $ delay , ? string $ routingKey ) { $ queue = $ this -> amqpFactory -> createQueue ( $ this -> channel ( ) ) ; $ queue -> setName ( str_replace ( '%delay%' , $ delay , $ this -> connectionOptions [ 'delay' ] [ 'queue_name_pattern' ] ) ) ; $ queue -> setArguments ( [ 'x-message-ttl' => $ delay , 'x-dead-letter-exchange' => $ this -> exchange ( ) -> getName ( ) , ] ) ; $ routingKey = $ routingKey ?? $ this -> getDefaultPublishRoutingKey ( ) ; if ( null !== $ routingKey ) { // after being released from to DLX, this routing key will be used $ queue -> setArgument ( 'x-dead-letter-routing-key' , $ routingKey ) ; } return $ queue ; }
docstring: Creates a delay queue that will delay for a certain amount of time.
  
  This works by setting message TTL for the delay and pointing
  the dead letter exchange to the original exchange. The result
  is that after the TTL, the message is sent to the dead-letter-exchange,
  which is the original exchange, resulting on it being put back into
  the original queue.
docstring_tokens: Creates a delay queue that will delay for a certain amount of time .