1. Go to this page and download the library: Download corley/queue library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$queue->delete($receipt);
// delete with options
$queue->delete($receipt, ["delay" => 20]);
$queue = new Queue("https://sqs.amazon.com/39857/urs", $sqsAdapter);
$queue->send("message", toSQS(["delay" => 20]));
function toSQS(array options = []) {
$opts = [];
if (array_key_exists("delay", $options)) {
$opts["DelaySeconds"] = $options["delay"];
}
return $opts;
}
public function send($queueName, $message, array $options);
public function receive($queueName, array $options);
public function delete($queueName, $receipt, array $options);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.