Download the PHP package dotkernel/dot-queue without Composer

On this page you can find all versions of the php package dotkernel/dot-queue. 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 dot-queue

dot-queue

OSS Lifecycle GitHub license

DotKernel queue component

Note

dot-queue is abandoned and will receive no further development!

Requirements

Installation

Run the following command

After installing all dependencies, add the \Dot\Queue\ConfigProvider::class to your configuration aggregate, in order to register all dependencies and console commands.

Queues

The following queue implementations are provided by this package

Queues must implement Dot\Queue\Queue\QueueInterface or extend Dot\Queue\Queue\AbstractQueue.

Queue adapters

Queue adapters are used in collaboration with the PersistentQueue. Queue adapters are specific to the storage used Provided queue adapters:

Queue adapters must implement Dot\Queue\Adapter\AdapterInterface

Configuring queues

At this moment, the package offers only a database adapter to be used with the persistent queue. Therefore, the config template below shows how to configure a MySQL queue.

Create a config file in your config/autoload folder, and replace the {{QUEUE_NAME}} with something appropriate

queue.global.php

You can configure multiple adapters and multiple queues. Multiple queues can also use the same queue adapter.

Creating job classes

A job represent the unit of work that will be processed by the queue as the queue is consumed. Create job classes by extending Dot\Queue\Job\AbstractJob.

A job must declare 2 methods

You can also inject the job class with the needed dependencies. Use a factory class and register the job in the service container for that.

The QueueManager

The Dot\Queue\Queue\QueueManager is the main class to be injected wherever you dispatch job to a queue.

In order to create and dispatch a job

Important

Consuming jobs

Run the following dotkernel command in order to start the worker loop to consume the default queue

For details on the supported command options run

Useful consumer options

In production, we advise you to use a monitoring software, such as supervisord in order to make sure that the consumer is kept alive. During development you can emulate supervisord with the npm-package called forever

Database migrations

In order to generate migrations files (to be used by Phinx library) for the jobs table and failed jobs table, two commands are provided

Running these commands, will generate migration files with the following default options

You can override these options using the --namespace=, --table-name= and --path options respectively

After you have generated the files you can run

in order to create the tables

Handling failed jobs

We provide several commands to help you manage the failed jobs

@TODO - QUEUE EVENTS


All versions of dot-queue with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
zendframework/zend-servicemanager Version ^3.3
dotkernel/dot-console Version ^0.1.0
phplucidframe/console-table Version ^1.2
ramsey/uuid Version ^3.7
zendframework/zend-validator Version ^2.10
zendframework/zend-filter Version ^2.7
psr/log Version ^1.0
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 dotkernel/dot-queue contains the following files

Loading the files please wait ....