Download the PHP package primitivesense/laravel-raw-sqs-connector without Composer

On this page you can find all versions of the php package primitivesense/laravel-raw-sqs-connector. 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 laravel-raw-sqs-connector

Laravel Raw SQS Connector

Build Status Maintainability Latest Stable Version Total Downloads License

About

The purpose of this package is to allow you to consume raw messages produced outside of Laravel from AWS SQS to then be handled natively within Laravel's Queue and Job system.

This library was originally built to allow the submission of jobs from AWS Lambda into Laravel.

Dependencies

Installation via Composer

To install:

How to use

Add the Service Provider into config/app.php like so:

Create a new job like so:

RawSqsJob is a base class that has all the required traits to allow for Laravel's Queue System to handle it correctly.

Your raw message from SQS can be accessed via $this->data, magic!

To then configure this within config/queue.php add the block below:

your-raw-sqs-queue is simply your custom message queue, the important bits to note are driver and job_class. driver is simply this packages raw-sqs connector and job_class just tells Laravel Queue which job to deletegate the raw message too.

Then simply invoke the below to start the queue

It does give you the flexibiity to push multiple messages into the queue but they will only be proccessed by that one job.

How it works

There is a new RawSqsConnector and RawSqsQueue. The RawSqsConnector handles the construction of the RawSqsQueue class which responsibility is to process/submit the messages to SQS. There is then a base RawSqsJob class which can be extended from which has all the traits required for the Queue system to delegate and handle the job correctly.

RawSqsQueue extends Larvel's SQS Queue, overriding a few core methods, the push methods are disabled as the package is designed to consume jobs from SQS rather than push jobs onto the Queue. The main amount of work resides within the overriden pop method which processes the incoming message. This method has been extended to take the message and marshal it into a format that Laravel's queue system understands to then be later handled by the job it's self.

Help!

If you have any issues please feel free to raise an issue!

Contributing

Contributions are more than welcome, please feel free to raise a PR but please ensure:

License

The Laravel Raw SQS Connector is open-sourced software licensed under the MIT license.


All versions of laravel-raw-sqs-connector with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-json Version *
illuminate/queue Version ^8.0
aws/aws-sdk-php Version ~3.1
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 primitivesense/laravel-raw-sqs-connector contains the following files

Loading the files please wait ....