delete

@param QueueMessage|mixed $message

@return  void
486238
public function delete($message)
    {
        if (!$message instanceof QueueMessage) {
            $msg = new QueueMessage();
            $msg->setId($message);
        }

        $this->driver->delete($message);

        $message->isDeleted(true);
    }
559380
public function deleteMessageAction(Message $message)
    {
        if ($this->authorization->isGranted('moderate', new ResourceCollection(array($message->getSubject()->getCategory()->getForum()->getResourceNode())))) {
            $this->manager->deleteMessage($message);

            return new RedirectResponse(
                $this->generateUrl('claro_forum_messages', array('subject' => $message->getSubject()->getId()))
            );
        }

        throw new AccessDeniedException();
    }
790431
public function delete($id)
    {
        if (!$this->queueExists()) {
            return false;
        }

        $this->sqs->deleteMessage([
            'QueueUrl'      => $this->queueUrl,
            'ReceiptHandle' => $id
        ]);

        $context = [
            'QueueUrl'      => $this->queueUrl,
            'ReceiptHandle' => $id
        ];
        $this->log(200,"Message deleted from SQS Queue", $context);

        return true;
    }
710282
public function ack(MessageMysql $queue_message){
        $queue_id = $queue_message->get_id();
        return $this->__handler->delete(array('id'=>$queue_id));
    }
484057
protected function note(...$message): void
    {
        if ($this->notice instanceof Notice) {
            $this->notice->add($message);
        }
    }
234727
def clear(self):
        """"""
        url = "queues/%s/messages" % self.name
        result = self.client.delete(url = url,
                                    body = json.dumps({}),
                                    headers={'Content-Type': 'application/json'})

        return result['body']
873242
private function removeMessage($messages)
    {
        if (! is_null($this->messageKey)) {
            unset($messages[$this->messageKey]);
            $this->messageKey = null;
        }

        return $messages;
    }
626962
public function delete(Task $task)
    {
        $this->om->remove($task);
        $this->om->flush();

        $this->notify(NotifierInterface::MESSAGE_DELETE);
    }
969772
public function pipe(CommandMessage $message): void
    {
        /** @var CommandFilter $filter */
        $filter = $this->stack->pop();
        $filter->process($message, [$this, 'pipe']);
    }
1154451
protected function flush($message) {
        switch ($this->output) {
            case self::PRINT_AS_OUTPUT:
                IO::out($message);
                break;
            case self::PRINT_AS_MESSAGE:
                IO::err($message);
                break;
        }
    }
863343
public function release(QueueMessage $message)
    {
        $queue = $message->getQueueName() ?: $this->queue;

        $time = new \DateTimeImmutable('now');
        $time = $time->modify('+' . $message->getDelay() . 'seconds');

        $values = [
            'id' => $message->getId(),
            'queue' => $queue,
            'reserved' => null,
            'visibility' => $time->format('Y-m-d H:i:s'),
        ];

        $sql = 'UPDATE ' . $this->table .
            ' SET reserved = :reserved, visibility = :visibility' .
            ' WHERE id = :id AND queue = :queue';

        $stat = $this->pdo->prepare($sql);

        $stat->execute($values);

        return $this;
    }
1067636
public function removeQueue($queueName)
    {
        $queueUrl = $this->resolveUrl($queueName);

        $this->sqs->deleteQueue([
            'QueueUrl' => $queueUrl,
        ]);
    }
37389
protected function queueDeclare($queue)
    {
        $this->channel->queue_declare($queue, false, true, false, false);
    }
1361710
def delete(options = {})
      options = options.merge(
        queue_url: @queue_url,
        receipt_handle: @receipt_handle
      )
      resp = @client.delete_message(options)
      resp.data
    end
1025472
public function release(QueueMessage $message)
    {
        $this->client->changeMessageVisibility(
            [
                'QueueUrl' => $this->getQueueUrl($message->getQueueName()),
                'ReceiptHandle' => $this->getReceiptHandle($message),
                'VisibilityTimeout' => $message->getDelay(),
            ]
        );

        return $this;
    }
1143598
public function push($queueName, Message $message)
    {
        $cache = $this->get($queueName);
        $cache->enqueue($message);
    }
938657
public function process(QueueMessage $message, Structure $options)
    {
        $maxTries = (int) $options->get('tries', 5);

        $job = $message->getJob();
        /** @var JobInterface $job */
        $job = unserialize($job);

        try {
            // @before event
            $this->triggerEvent(
                'onWorkerBeforeJobRun',
                [
                    'worker' => $this,
                    'message' => $message,
                    'job' => $job,
                    'manager' => $this->manager,
                ]
            );

            // Fail if max attempts
            if ($maxTries !== 0 && $maxTries < $message->getAttempts()) {
                $this->manager->delete($message);

                throw new MaxAttemptsExceededException('Max attempts exceed for Message: ' . $message->getId());
            }

            // run
            $job->execute();

            // @after event
            $this->triggerEvent(
                'onWorkerAfterJobRun',
                [
                    'worker' => $this,
                    'message' => $message,
                    'job' => $job,
                    'manager' => $this->manager,
                ]
            );

            $this->manager->delete($message);
        } catch (\Throwable $t) {
            $this->handleJobException($job, $message, $options, $t);
        } finally {
            if (!$message->isDeleted()) {
                $this->manager->release($message, (int) $options->get('delay', 0));
            }
        }
    }