Download the PHP package magefast/module-qprocess without Composer

On this page you can find all versions of the php package magefast/module-qprocess. 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 module-qprocess

Magefast_Qprocess.
Magento module, Easy Add Task to Queue

Sample module how can add Queue Message and processing it.

CLI command for retrieve list of all configured Queue Message:

bin/magento queue:consumers:list

CLI command for watch/listen Queue Messages:

bin/magento queue:consumers:start -vvv qprocess.task

CLI command for add test Queue Message:

bin/magento qprocess:test

Service for Publish (add) Queue Message

\Magefast\Qprocess\Service\Add::execute

Method where processed Queue Message, here can(need) add custom logic for processing - add Event, Service etc.

\Magefast\Qprocess\Model\Task::processMessage

Sample: How To add Task to Queue with this Module Magefast_Qprocess

1) For example in Observer Class for event catalog_product_save_after need add Task for Sync/Send SMS
or Call to External services.
Bellow sample of Observer Class

namespace Strekoza\Sample\Observer;

use Magefast\Qprocess\Service\Add;
use Magento\Catalog\Model\Product;
use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Serialize\Serializer\Json;

class ProductUpdateObserver implements ObserverInterface
{
    private Json $json;
    private Add $addMessageQueue;

    public function __construct(
        Json $json,
        Add  $addMessageQueue
    )
    {
        $this->json = $json;
        $this->addMessageQueue = $addMessageQueue;
    }

    public function execute(EventObserver $observer)
    {
        /** @var Product $product */
        $product = $observer->getEvent()->getProduct();

        /**
         * Add to QUEUE
         */
        $objectData = [];
        $objectData['sku'] = $product->getSku();

        $jsonData = [
            'type' => 'custom_task_product',
            'data' => $objectData
        ];

        $jsonSting = $this->json->serialize($jsonData);

        $this->addMessageQueue->execute('qprocess.task', $jsonSting);
    }
}


2) Add solution for Processing of Task, that added before. It will added with event qprocess_task. Bellow peace of code for etc/events.xml

And Observer Class QprocessTask

namespace Strekoza\Sample\Observer;

use Exception;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Serialize\Serializer\Json;

class QprocessTask implements ObserverInterface
{
    private Json $json;

    public function __construct(
        Json $json
    )
    {
        $this->json = $json;
    }

    public function execute(Observer $observer)
    {
        $object = $observer->getEvent()->getObject();

        $data = $this->json->unserialize($object->getValue());

        if (!is_array($data)) {
            return;
        }

        if (!isset($data['type']) || !isset($data['data'])) {
            $object->setResult(false);
            return;
        }

        if ($data['type'] == 'custom_task_product') {
            try {

                $sku = $data['data']['sku'];
                //@todo YOUR LOGIC HERE with $sku of Product

                return;
            } catch (Exception $e) {
                return;
            }
        }
    }
}


3) Its All. Take a look, if class/file Observer\QprocessTask is changed, need also regenerate code.

Install With Composer

composer require magefast/module-qprocess



Links

https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html
https://www.atwix.com/magento-2/getting-started-with-message-queues-in-magento/
https://store.magenest.com/blog/create-a-message-queue-in-magento-2/
https://webkul.com/blog/here-we-will-learn-how-to-configure-and-use-rabbitmq-in-magento-2-3/
https://blog.gaiterjones.com/magento-2-asynchronous-message-queue-management/
https://blogs.perficient.com/2021/03/09/rabbitmq-integration-with-magento-2-4/
https://amasty.com/knowledge-base/how-to-use-rabbitmq-in-magento-2-plugins.html
https://inviqa.com/blog/magento-2-tutorial-message-queues


All versions of module-qprocess with dependencies

PHP Build Version
Package Version
Requires magento/framework Version *
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 magefast/module-qprocess contains the following files

Loading the files please wait ...