PHP code example of valantic-spryker-eco / sqs
1. Go to this page and download the library: Download valantic-spryker-eco/sqs 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/ */
valantic-spryker-eco / sqs example snippets
...
/**
* @var string
*/
public const AWS_SQS = 'aws-sqs';
...
/**
* @return array
*/
protected function getMessageCheckOptions(): array
{
return [
QueueConstants::QUEUE_WORKER_MESSAGE_CHECK_OPTION => [
...
static::AWS_SQS => $this->getAwsSqsQueueMessageCheckOptions(),
];
}
...
/**
* @return \Generated\Shared\Transfer\AwsSqsConsumerOptionTransfer
*/
protected function getAwsSqsQueueMessageCheckOptions(): AwsSqsConsumerOptionTransfer
{
$queueOptionTransfer = new AwsSqsConsumerOptionTransfer();
$queueOptionTransfer->setCheckMessageCount(true);
return $queueOptionTransfer;
}
...
/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return \Symfony\Component\Console\Command\Command[]
*/
protected function getConsoleCommands(Container $container): array
{
$commands = [
...
new SqsCreateQueuesConsole(),
new SqsPurgeAllQueuesConsole(),
new SqsRemoveQueuesConsole(),
];