Aws Sqs Wrapper installation is very simple. Open the terminal and run this command
composer require bariseser/sqs
$consumer = (new SqsConsumer())
->setQueueUrl("http://localhost:4566/000000000000/client_api.fifo");
while (true) {
$messages = $consumer->messages();
if (!empty($messages->get('Messages'))) {
foreach ($messages->get('Messages') as $message) {
echo $message['Body'].PHP_EOL;
}
} else {
echo "No messages in queue". PHP_EOL;
}
}
$producer = (new SqsConsumer())
->setQueueUrl("http://localhost:4566/000000000000/client_api.fifo");
$producer->setMessageBody(json_encode(['title' => "baris eser", 'id' => 12345]))->publish();
1 - Fork the Project
2 - Ensure you have Composer installed (see Composer Download Instructions)
3 - Install Development Dependencies
composer install
4 - Run the Test Suite
vendor/bin/phpunit
5 - Send us a Pull Request