Download the PHP package smartframe/queue-sqs without Composer

On this page you can find all versions of the php package smartframe/queue-sqs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package queue-sqs

SlmQueueSqs

Build Status Latest Stable Version Latest Unstable Version Total Downloads

Version 0.5.0 Created by Jurian Sluiman and Michaël Gallego

Requirements

To-do

Feel free to help in those areas if you like this module !

Installation

First, install SlmQueue (instructions here). Then, add the following line into your composer.json file:

Then, enable the module by adding SlmQueueSqs in your application.config.php file (you must also add the AwsModule key for enabling the AWS ZF2 module.

Starting from 0.3.0, SlmQueueSqs now internally uses the official AWS Zend Framework 2 module, so you can write your credentials only once for all AWS services.

Configuring AWS

Version must be specified for AWS SQS!

Documentation

Before reading SlmQueueSqs documentation, please read SlmQueue documentation.

SlmQueueSqs does not offer any features to create queues. You should use the official SQS SDK or use the AWS console.

Setting your AWS credentials

Please refer to the documentation of the official AWS ZF2 module.

Setting metadata

Like other SlmQueue providers, you can set specific metadata to a job. Please note that this is different from the built-in message attributes that was introduced in SQS in May 2014. SlmQueueSqs does not support this currently, but this is very similar to the metadata in SlmQueue.

Please note that, when jobs are retrieved using the worker, some metadata pulled from SQS are automatically injected into your job. Therefore, you are encouraged to NOT use those keys, as your metadata will override SQS metadata:

Adding queues

SlmQueueSqs provides an interface for SQS queues that extends SlmQueue\Queue\QueueInterface, and provides in addition the following methods:

A concrete class that implements this interface is included: SlmQueueSqs\Queue\SqsQueue and a factory is available to create Sqs queues. Therefore, if you want to have a queue called "newsletter", just add the following line in your module.config.php file:

This queue can therefore be pulled from the QueuePluginManager class.

Operations on queues

The name of the options match the names of the Amazon AWS SDK.

push / batchPush

Valid option is:

Example:

pop

Valid options are:

batchPop

Valid options are:

Configuring queues

You may want to explicitly set queue URL instead of having it automatically fetched by its name (this can be useful if you want to use different queues in prod and test environments, while still referencing it using the same queue name in your code). To do so, add the following config:

Now, this URL will be reused instead of fetching it to AWS servers.

Executing jobs

SlmQueueSqs provides a command-line tool that can be used to pop and execute jobs. You can type the following command within the public folder of your Zend Framework 2 application:

php index.php queue sqs <queue> [--visibilityTimeout=] [--waitTime=]

The queue name is a mandatory parameter, while the other parameters are all optional:

Troubleshooting

Issue:

Solution: See above Aws configuration example for version definition.


All versions of queue-sqs with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ~8.0.0 || ~8.1.0
laminas/laminas-eventmanager Version ^2.6 || ^3.0
laminas/laminas-servicemanager Version ^2.7 || ^3.0
laminas/laminas-stdlib Version ^2.2 || ^3.0
slm/queue Version ^2.0 || ^3.0
aws/aws-sdk-php Version ^3.140
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smartframe/queue-sqs contains the following files

Loading the files please wait ....